1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

[feature/passwords] Undo simplification to bcrypt driver

By simplifying, a needed part was removed that is actually required.

PHPBB3-11610
This commit is contained in:
Marc Alexander 2013-12-29 17:04:38 +01:00
parent 808c54fa89
commit 141bef75cb

View File

@ -29,8 +29,9 @@ class bcrypt extends base
*/ */
public function hash($password, $salt = '') public function hash($password, $salt = '')
{ {
// Get prefix of this driver // The 2x and 2y prefixes of bcrypt might not be supported
$prefix = $this->get_prefix(); // 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 // Do not support 8-bit characters with $2a$ bcrypt
// Also see http://www.php.net/security/crypt_blowfish.php // Also see http://www.php.net/security/crypt_blowfish.php