diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2017-09-08 16:06:46 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2017-09-08 16:06:46 +0200 |
commit | 93621aa1844ab48d9bae068d9872d2c49ae86de4 (patch) | |
tree | bd4a59a449548a873da5d07d24634abaf6a727a9 | |
parent | fa3bdedf7bebd64336daaeff7c41b842fa098cf9 (diff) | |
parent | 7e4498dfb542aab56cf396ca7dbc78fe0298bccc (diff) | |
download | forums-93621aa1844ab48d9bae068d9872d2c49ae86de4.tar forums-93621aa1844ab48d9bae068d9872d2c49ae86de4.tar.gz forums-93621aa1844ab48d9bae068d9872d2c49ae86de4.tar.bz2 forums-93621aa1844ab48d9bae068d9872d2c49ae86de4.tar.xz forums-93621aa1844ab48d9bae068d9872d2c49ae86de4.zip |
Merge pull request #4929 from marc1706/ticket/15347
[ticket/15347] Use single quotes in update hashes query
-rw-r--r-- | phpBB/phpbb/console/command/fixup/update_hashes.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/cron/task/core/update_hashes.php | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/phpbb/console/command/fixup/update_hashes.php b/phpBB/phpbb/console/command/fixup/update_hashes.php index 4bcc3b5d19..9a0e9bc798 100644 --- a/phpBB/phpbb/console/command/fixup/update_hashes.php +++ b/phpBB/phpbb/console/command/fixup/update_hashes.php @@ -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(); } diff --git a/phpBB/phpbb/cron/task/core/update_hashes.php b/phpBB/phpbb/cron/task/core/update_hashes.php index a4fe477d99..ba095abc8b 100644 --- a/phpBB/phpbb/cron/task/core/update_hashes.php +++ b/phpBB/phpbb/cron/task/core/update_hashes.php @@ -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); } |