diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-06-02 10:14:26 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-06-02 10:14:26 +0200 |
commit | ac311e1b39f891ba3c137f6203981c491639bec3 (patch) | |
tree | 43e76978dcbc89aec7ad6a65d2f08cadc62772e6 /phpBB/phpbb/passwords/driver/bcrypt_wcf2.php | |
parent | 94b2b64ca199f3db66818c3830c96ea9ff7eeff9 (diff) | |
download | forums-ac311e1b39f891ba3c137f6203981c491639bec3.tar forums-ac311e1b39f891ba3c137f6203981c491639bec3.tar.gz forums-ac311e1b39f891ba3c137f6203981c491639bec3.tar.bz2 forums-ac311e1b39f891ba3c137f6203981c491639bec3.tar.xz forums-ac311e1b39f891ba3c137f6203981c491639bec3.zip |
[ticket/12352] Do not check hashes that don't have the necessary length
This should significantly reduce the time spent on checking hashes of
passwords that should be converted.
PHPBB3-12352
Diffstat (limited to 'phpBB/phpbb/passwords/driver/bcrypt_wcf2.php')
-rw-r--r-- | phpBB/phpbb/passwords/driver/bcrypt_wcf2.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/passwords/driver/bcrypt_wcf2.php b/phpBB/phpbb/passwords/driver/bcrypt_wcf2.php index fe6e36406e..f706c7af69 100644 --- a/phpBB/phpbb/passwords/driver/bcrypt_wcf2.php +++ b/phpBB/phpbb/passwords/driver/bcrypt_wcf2.php @@ -65,7 +65,7 @@ class bcrypt_wcf2 extends base */ public function check($password, $hash, $user_row = array()) { - if (empty($hash)) + if (empty($hash) || strlen($hash) != 60) { return false; } |