diff options
Diffstat (limited to 'phpBB/admin/pagestart.php')
| -rw-r--r-- | phpBB/admin/pagestart.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/phpBB/admin/pagestart.php b/phpBB/admin/pagestart.php index 59df5b0f40..b640029279 100644 --- a/phpBB/admin/pagestart.php +++ b/phpBB/admin/pagestart.php @@ -37,6 +37,17 @@ $user = new user($userdata); // End session management // +// +// If session_ids do not match, rewrite the URL correctly then redirect the user +// +if ($_REQUEST['sid'] != $userdata['session_id']) +{ + $url = preg_replace('/sid=([^&]*)(&?)/i', '', $_SERVER['REQUEST_URI']); + $url = preg_replace('/\?$/', '', $url); + $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id']; + redirect($url); +} + // ----------------------------- // Functions function page_header($sub_title, $meta = '', $table_html = true) @@ -106,6 +117,8 @@ function page_footer($copyright_html = true) { global $board_config, $db, $lang, $phpEx; + // Close our DB connection. + $db->sql_close(); ?> </td> @@ -128,9 +141,6 @@ function page_footer($copyright_html = true) } - // Close our DB connection. - $db->sql_close(); - exit; } |
