summaryrefslogtreecommitdiff
path: root/include/sanity_check.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-13 18:24:27 +0400
committerAndrew Dolgov <[email protected]>2013-04-13 18:24:41 +0400
commit044cff2d74ece46256201695346d1a0d1d66c746 (patch)
treef8c4c039e69bde071b74ca27f35839f0a3a55eb7 /include/sanity_check.php
parent5b27cb05a8af1bcf741a3885b17fc7d03d456c5f (diff)
implement basic feed authentication parameter encryption in the database (FEED_CRYPT_KEY)
Diffstat (limited to 'include/sanity_check.php')
-rw-r--r--include/sanity_check.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php
index 69309290e..b4102d234 100644
--- a/include/sanity_check.php
+++ b/include/sanity_check.php
@@ -67,6 +67,14 @@
array_push($errors, "Javascript cache is not writable (chmod -R 777 ".CACHE_DIR."/js)");
}
+ if (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")) {
+ array_push($errors, "FEED_CRYPT_KEY requires mcrypt functions which are not found.");
+ }
+
if (GENERATED_CONFIG_CHECK != EXPECTED_CONFIG_VERSION) {
array_push($errors,
"Configuration option checker sanity_config.php is outdated, please recreate it using ./utils/regen_config_checks.sh");