summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-05-05 10:16:54 +0300
committerAndrew Dolgov <[email protected]>2017-05-05 10:16:54 +0300
commite35ba0e2121977d123159a18581c229b26054e74 (patch)
tree5cf0812ca5228e6540e8bfa12d7fc1dbe37de64a /include
parent0a795316963c72428632c517721ce162d27309c5 (diff)
add sanity check for SELF_URL_PATH going to http url if server is accessed over https
Diffstat (limited to 'include')
-rwxr-xr-xinclude/sanity_check.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php
index 3b3e281ec..12cc5579d 100755
--- a/include/sanity_check.php
+++ b/include/sanity_check.php
@@ -147,6 +147,12 @@
if (!class_exists("DOMDocument")) {
array_push($errors, "PHP support for DOMDocument is required, but was not found.");
}
+
+ $self_scheme = parse_url(SELF_URL_PATH, PHP_URL_SCHEME);
+
+ if ($_SERVER['HTTPS'] && $self_scheme == 'http') {
+ array_push($errors, "You are accessing tt-rss over SSL but SELF_URL_PATH in config.php refers to a http:// URL.");
+ }
}
if (count($errors) > 0 && $_SERVER['REQUEST_URI']) { ?>