aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-10-12 15:20:33 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-10-12 15:20:33 +0000
commit23ef85fa74c07093a9f7de6879fabebc0aeed18f (patch)
treececc2baa58e214d0c9fb348398363947d08225a7 /phpBB/includes/session.php
parentc2567c38ff787d4d6dd7985a6fc6a3c78cec2aa1 (diff)
downloadforums-23ef85fa74c07093a9f7de6879fabebc0aeed18f.tar
forums-23ef85fa74c07093a9f7de6879fabebc0aeed18f.tar.gz
forums-23ef85fa74c07093a9f7de6879fabebc0aeed18f.tar.bz2
forums-23ef85fa74c07093a9f7de6879fabebc0aeed18f.tar.xz
forums-23ef85fa74c07093a9f7de6879fabebc0aeed18f.zip
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
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 09a52feb1f..079d7b9f07 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -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;
}