From c0ed2d6fed6e04a762ff449a2eb467de67912a79 Mon Sep 17 00:00:00 2001 From: ygbillet Date: Tue, 19 Mar 2013 20:37:28 +0100 Subject: [PATCH 1/2] 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 +} From 24401c09714dd413856661b58a0595be75f14523 Mon Sep 17 00:00:00 2001 From: ygbillet Date: Tue, 19 Mar 2013 20:40:07 +0100 Subject: [PATCH 2/2] Update model.php flush_* functions do not need arguments. --- miniflux/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniflux/model.php b/miniflux/model.php index a56b590..7fa8e6c 100644 --- a/miniflux/model.php +++ b/miniflux/model.php @@ -167,7 +167,7 @@ function set_item_read($id) } -function flush_unread($id) +function flush_unread() { \PicoTools\singleton('db') ->table('items') @@ -176,7 +176,7 @@ function flush_unread($id) } -function flush_read($id) +function flush_read() { \PicoTools\singleton('db') ->table('items')