Skip to content

Commit 673740e

Browse files
author
bnu
committed
file object cache 사용 시 캐시 파일의 경로에 사용할 수 없는 문자열 제거
1 parent 97112bd commit 673740e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

classes/cache/CacheFile.class.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ function __construct()
4949
*/
5050
function getCacheFileName($key)
5151
{
52-
return $this->cache_dir . str_replace(':', DIRECTORY_SEPARATOR, $key) . '.php';
52+
$path_string = preg_replace("/[^a-z0-9-_:\.]+/i", '_', $key);
53+
return $this->cache_dir . str_replace(':', DIRECTORY_SEPARATOR, $path_string) . '.php';
5354
}
5455

5556
/**

0 commit comments

Comments
 (0)