sanity: check whether SELF_URL_PATH conforms to data returned by httpd

master
Andrew Dolgov 7 years ago
parent 890a7be0c6
commit 7506b61af2

@ -97,11 +97,17 @@
} }
} }
$ref_self_url_path = make_self_url_path();
$ref_self_url_path = preg_replace("/\w+\.php$/", "", $ref_self_url_path);
if (SELF_URL_PATH == "http://example.org/tt-rss/") { if (SELF_URL_PATH == "http://example.org/tt-rss/") {
$urlpath = preg_replace("/\w+\.php$/", "", make_self_url_path()); array_push($errors,
"Please set SELF_URL_PATH to the correct value for your server (possible value: <b>$ref_self_url_path</b>)");
}
if (SELF_URL_PATH != $ref_self_url_path && (!defined('_SKIP_SELF_URL_PATH_CHECKS') || !_SKIP_SELF_URL_PATH_CHECKS)) {
array_push($errors, array_push($errors,
"Please set SELF_URL_PATH to the correct value for your server (possible value: <b>$urlpath</b>)"); "Please set SELF_URL_PATH to the correct value detected for your server: <b>$ref_self_url_path</b>");
} }
if (!is_writable(ICONS_DIR)) { if (!is_writable(ICONS_DIR)) {

Loading…
Cancel
Save