mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-21 16:10:38 +01:00
Merge pull request #4929 from marc1706/ticket/15347
[ticket/15347] Use single quotes in update hashes query
This commit is contained in:
commit
93621aa184
phpBB/phpbb
@ -101,9 +101,9 @@ class update_hashes extends \phpbb\console\command\command
|
||||
{
|
||||
$new_hash = $this->passwords_manager->hash($row['user_password'], array($this->default_type));
|
||||
|
||||
$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);
|
||||
$progress_bar->advance();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user