diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-12-29 17:04:38 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-12-29 17:04:38 +0100 |
commit | 141bef75cb924644191c90bd722a250ef60099b7 (patch) | |
tree | dc712cc7e90ba142ae36ac0c7f6c1561cba9dfaa /phpBB/phpbb/passwords | |
parent | 808c54fa89f556e6f4701d4f8c6c418393ddfc13 (diff) | |
download | forums-141bef75cb924644191c90bd722a250ef60099b7.tar forums-141bef75cb924644191c90bd722a250ef60099b7.tar.gz forums-141bef75cb924644191c90bd722a250ef60099b7.tar.bz2 forums-141bef75cb924644191c90bd722a250ef60099b7.tar.xz forums-141bef75cb924644191c90bd722a250ef60099b7.zip |
[feature/passwords] Undo simplification to bcrypt driver
By simplifying, a needed part was removed that is actually required.
PHPBB3-11610
Diffstat (limited to 'phpBB/phpbb/passwords')
-rw-r--r-- | phpBB/phpbb/passwords/driver/bcrypt.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/phpbb/passwords/driver/bcrypt.php b/phpBB/phpbb/passwords/driver/bcrypt.php index b16d2ada56..1d1b1e267d 100644 --- a/phpBB/phpbb/passwords/driver/bcrypt.php +++ b/phpBB/phpbb/passwords/driver/bcrypt.php @@ -29,8 +29,9 @@ class bcrypt extends base */ public function hash($password, $salt = '') { - // Get prefix of this driver - $prefix = $this->get_prefix(); + // The 2x and 2y prefixes of bcrypt might not be supported + // Revert to 2a if this is the case + $prefix = (!$this->is_supported()) ? '$2a$' : $this->get_prefix(); // Do not support 8-bit characters with $2a$ bcrypt // Also see http://www.php.net/security/crypt_blowfish.php |