1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2021-02-18 21:14:20 +01:00
3 changed files with 6 additions and 6 deletions

View File

@@ -181,10 +181,10 @@ class token_storage implements TokenStorageInterface
{
$this->cachedToken = null;
$sql = 'DELETE FROM ' . $this->oauth_token_table . '
$sql = 'DELETE FROM ' . $this->oauth_token_table . '
WHERE user_id = ' . (int) $this->user->data['user_id'];
if ((int) $this->user->data['user_id'] === ANONYMOUS)
if ((int) $this->user->data['user_id'] === ANONYMOUS && isset($this->user->data['session_id']))
{
$sql .= " AND session_id = '" . $this->db->sql_escape($this->user->data['session_id']) . "'";
}
@@ -504,7 +504,7 @@ class token_storage implements TokenStorageInterface
*/
protected function get_access_token_row($data)
{
$sql = 'SELECT oauth_token
$sql = 'SELECT oauth_token
FROM ' . $this->oauth_token_table . '
WHERE ' . $this->db->sql_build_array('SELECT', $data);
$result = $this->db->sql_query($sql);
@@ -523,7 +523,7 @@ class token_storage implements TokenStorageInterface
*/
protected function get_state_row($data)
{
$sql = 'SELECT oauth_state
$sql = 'SELECT oauth_state
FROM ' . $this->oauth_state_table . '
WHERE ' . $this->db->sql_build_array('SELECT', $data);
$result = $this->db->sql_query($sql);