From 5276b7c768332800f6a39658d99b103f81b1598d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 13 Apr 2013 18:32:57 +0400 Subject: [PATCH] fix handling of blank FEED_CRYPT_KEY --- include/sanity_check.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sanity_check.php b/include/sanity_check.php index b4102d23..29de4ff5 100644 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -67,11 +67,11 @@ array_push($errors, "Javascript cache is not writable (chmod -R 777 ".CACHE_DIR."/js)"); } - if (strlen(FEED_CRYPT_KEY) != 24) { + if (strlen(FEED_CRYPT_KEY) > 0 && strlen(FEED_CRYPT_KEY) != 24) { array_push($errors, "FEED_CRYPT_KEY should be exactly 24 characters in length."); } - if (strlen(FEED_CRYPT_KEY) != 0 && !function_exists("mcrypt_decrypt")) { + if (strlen(FEED_CRYPT_KEY) > 0 && !function_exists("mcrypt_decrypt")) { array_push($errors, "FEED_CRYPT_KEY requires mcrypt functions which are not found."); } -- 2.39.5