diff --git a/fp-includes/core/core.static.php b/fp-includes/core/core.static.php index cc50e41..8e2a97e 100755 --- a/fp-includes/core/core.static.php +++ b/fp-includes/core/core.static.php @@ -24,15 +24,23 @@ } function static_parse($id) { + if (!static_isvalid($id)) return false; + if ($fname=static_exists($id)) { $entry = io_load_file($fname); return (utils_kexplode($entry)); } return array(); } + + function static_isvalid($id) { + return !preg_match('/[^./\\\\]+/', $id); + } function static_save($entry, $id, $oldid=null) { + if (!static_isvalid($id)) return false; + $fname = STATIC_DIR . $id . EXT; $entry['content'] = apply_filters('content_save_pre', $entry['content']); @@ -51,6 +59,8 @@ } function static_exists($id) { + if (!static_isvalid($id)) return false; + $fname = STATIC_DIR . $id . EXT; if (file_exists($fname)) @@ -60,6 +70,8 @@ } function static_delete($id) { + if (!static_isvalid($id)) return false; + return fs_delete(STATIC_DIR . $id . EXT); } diff --git a/fp-includes/core/core.system.php b/fp-includes/core/core.system.php index 0915908..b4deb58 100755 --- a/fp-includes/core/core.system.php +++ b/fp-includes/core/core.system.php @@ -73,7 +73,7 @@ - define('SYSTEM_VER', '1.0'); + define('SYSTEM_VER', '1.0.1'); function system_ver() { return 'fp-' . SYSTEM_VER; }