From dc0610b8686fffdc4d69a97a9f064579a7bf9f14 Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Tue, 31 Jan 2017 11:43:04 +0100 Subject: [PATCH] * [FIX] Solves #394. Fixed the Blowfish salt length to 22 chars long. Thanks to @ipshenicyn for the feedback. --- inc/SP/Core/Crypt.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/SP/Core/Crypt.class.php b/inc/SP/Core/Crypt.class.php index bd25393b..e6da1886 100644 --- a/inc/SP/Core/Crypt.class.php +++ b/inc/SP/Core/Crypt.class.php @@ -285,7 +285,7 @@ class Crypt $salt = Config::getConfig()->getPasswordSalt(); } - $salt = '$2y$07$' . $salt . '$'; + $salt = '$2y$07$' . substr($salt, 0, 21) . '$'; return substr(crypt($string, $salt), 7, 32); }