mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-06-29 12:20:51 +02:00
add sanity check for SELF_URL_PATH going to http url if server is accessed over https
This commit is contained in:
parent
0a79531696
commit
e35ba0e212
|
@ -147,6 +147,12 @@
|
||||||
if (!class_exists("DOMDocument")) {
|
if (!class_exists("DOMDocument")) {
|
||||||
array_push($errors, "PHP support for DOMDocument is required, but was not found.");
|
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']) { ?>
|
if (count($errors) > 0 && $_SERVER['REQUEST_URI']) { ?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user