]> git.wh0rd.org - tt-rss.git/commitdiff
fix handling of blank FEED_CRYPT_KEY
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 13 Apr 2013 14:32:57 +0000 (18:32 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 13 Apr 2013 14:32:57 +0000 (18:32 +0400)
include/sanity_check.php

index b4102d23492ac74214923ef505ec06d470b0d3b6..29de4ff5e8762c115de0aae94317576de0b781e5 100644 (file)
                                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.");
                        }