mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
[ticket/10913] Redirect to index if session id is required but was not sent
PHPBB3-10913
This commit is contained in:
parent
efa96e1817
commit
42dd60edad
1 changed files with 9 additions and 2 deletions
|
@ -322,8 +322,15 @@ class session
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is session_id is set or session_id is set and matches the url param if required
|
// if no session id is set, redirect to index.php
|
||||||
if (!empty($this->session_id) && (!defined('NEED_SID') || (isset($_GET['sid']) && $this->session_id === $_GET['sid'])))
|
if (defined('NEED_SID') && (!isset($_GET['sid']) || $this->session_id !== $_GET['sid']))
|
||||||
|
{
|
||||||
|
send_status_line(401, 'Not authorized');
|
||||||
|
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// if session id is set
|
||||||
|
if (!empty($this->session_id))
|
||||||
{
|
{
|
||||||
$sql = 'SELECT u.*, s.*
|
$sql = 'SELECT u.*, s.*
|
||||||
FROM ' . SESSIONS_TABLE . ' s, ' . USERS_TABLE . " u
|
FROM ' . SESSIONS_TABLE . ' s, ' . USERS_TABLE . " u
|
||||||
|
|
Loading…
Add table
Reference in a new issue