1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

some test code, hopefully working for all occassions where we are using the functions...

git-svn-id: file:///svn/phpbb/trunk@6487 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-10-12 15:20:33 +00:00
parent c2567c38ff
commit 23ef85fa74
2 changed files with 21 additions and 2 deletions

View File

@@ -64,7 +64,8 @@ class session
$query_string = trim(implode('&', $args));
// basenamed page name (for example: index.php)
$page_name = htmlspecialchars(basename($script_name));
$page_name = basename($script_name);
$page_name = urlencode(htmlspecialchars($page_name));
// current directory within the phpBB root (for example: adm)
$root_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($root_path)));
@@ -112,6 +113,11 @@ class session
'page' => $page
);
if (!file_exists($page_name))
{
trigger_error('You are on a page that does not exist!', E_USER_ERROR);
}
return $page_array;
}