aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/crypto/driver/bcrypt.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/crypto/driver/bcrypt.php')
-rw-r--r--phpBB/includes/crypto/driver/bcrypt.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/includes/crypto/driver/bcrypt.php b/phpBB/includes/crypto/driver/bcrypt.php
index 12400cf376..82ff2fb844 100644
--- a/phpBB/includes/crypto/driver/bcrypt.php
+++ b/phpBB/includes/crypto/driver/bcrypt.php
@@ -61,9 +61,8 @@ class phpbb_crypto_driver_bcrypt extends phpbb_crypto_driver_base
*/
public function check($password, $hash)
{
- $salt = substr($hash, strpos($hash, '$', 4) + 1, 22);
- var_dump('bcrypt salt: ' . $salt . ' with length ' . strlen($salt));
- if (strlen($salt) != 22)
+ $salt = substr($hash, 0, 29);
+ if (strlen($salt) != 29)
{
return false;
}