From c0ed2d6fed6e04a762ff449a2eb467de67912a79 Mon Sep 17 00:00:00 2001 From: ygbillet Date: Tue, 19 Mar 2013 20:37:28 +0100 Subject: [PATCH] Update Crypto.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct return test on `crypt()`.  On failure `crypt()` returns a string that is shorter than 13 characters. --- miniflux/vendor/PicoTools/Crypto.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/miniflux/vendor/PicoTools/Crypto.php b/miniflux/vendor/PicoTools/Crypto.php index d873b48..863d39f 100644 --- a/miniflux/vendor/PicoTools/Crypto.php +++ b/miniflux/vendor/PicoTools/Crypto.php @@ -43,7 +43,7 @@ function password_verify($password, $hash) { $ret = crypt($password, $hash); - if (! is_string($ret) || strlen($ret) != strlen($hash) || strlen($ret) <= 13) { + if (! is_string($ret) || strlen($ret) != strlen($hash) || strlen($ret) < 13) { return false; } @@ -69,7 +69,7 @@ function password_hash($password) $ret = crypt($password, $hash); - if (! is_string($ret) || strlen($ret) <= 13) { + if (! is_string($ret) || strlen($ret) < 13) { return false; } @@ -147,4 +147,4 @@ function password_salt($required_salt_len) $salt = str_replace('+', '.', base64_encode($buffer)); return substr($salt, 0, $required_salt_len); -} \ No newline at end of file +}