[ticket/15347] Use single quotes in update hashes query

PHPBB3-15347
This commit is contained in:
Marc Alexander 2017-09-07 16:24:00 +02:00
parent fa3bdedf7b
commit 38cbdb6768
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -111,9 +111,9 @@ class update_hashes extends \phpbb\cron\task\base
// Increase number so we know that users were selected from the database
$affected_rows++;
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_password = "' . $this->db->sql_escape($new_hash) . '"
WHERE user_id = ' . (int) $row['user_id'];
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_password = '" . $this->db->sql_escape($new_hash) . "'
WHERE user_id = " . (int) $row['user_id'];
$this->db->sql_query($sql);
}