From c511b2264c38f261b851cf9296204bbef213f20e Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Fri, 4 Dec 2015 18:12:42 +0100 Subject: [PATCH] Use case insensitive compare when validating the fever api key User aschilling made some extensive client tests with miniflux and noticed that Mr Reader (iOS) and ReadKit (OSX) are sending the API key in upper case. --- fever/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fever/index.php b/fever/index.php index b3e6624..3453a33 100644 --- a/fever/index.php +++ b/fever/index.php @@ -46,7 +46,7 @@ function auth() $response = array( 'api_version' => 3, - 'auth' => (int) (@$_POST['api_key'] === $api_key), + 'auth' => (int) (isset($_POST['api_key']) && (strcasecmp($_POST['api_key'], $api_key) === 0 )), 'last_refreshed_on_time' => time(), );