mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/passwords] Correctly supply hash salt and settings to bcrypt
PHPBB3-11610
This commit is contained in:
parent
c9afda5a65
commit
d3d317a2de
1 changed files with 2 additions and 3 deletions
|
@ -61,9 +61,8 @@ class phpbb_crypto_driver_bcrypt extends phpbb_crypto_driver_base
|
||||||
*/
|
*/
|
||||||
public function check($password, $hash)
|
public function check($password, $hash)
|
||||||
{
|
{
|
||||||
$salt = substr($hash, strpos($hash, '$', 4) + 1, 22);
|
$salt = substr($hash, 0, 29);
|
||||||
var_dump('bcrypt salt: ' . $salt . ' with length ' . strlen($salt));
|
if (strlen($salt) != 29)
|
||||||
if (strlen($salt) != 22)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue