mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 03:22:37 +02:00
[ticket/13234-2] Correctly verify that user_id is set in user data array
PHPBB3-13234-2
This commit is contained in:
@@ -605,7 +605,7 @@ class session
|
|||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$user_data = $db->sql_fetchrow($result);
|
$user_data = $db->sql_fetchrow($result);
|
||||||
|
|
||||||
if ($user_id === false || $user_id == $user_data['user_id'])
|
if ($user_id === false || (isset($user_data['user_id']) && $user_id == $user_data['user_id']))
|
||||||
{
|
{
|
||||||
$this->data = $user_data;
|
$this->data = $user_data;
|
||||||
$bot = false;
|
$bot = false;
|
||||||
@@ -935,7 +935,7 @@ class session
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reset the data array
|
// Reset the data array
|
||||||
$this->data = false;
|
$this->data = array();
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . USERS_TABLE . '
|
FROM ' . USERS_TABLE . '
|
||||||
|
Reference in New Issue
Block a user