From: Andrew Dolgov Date: Thu, 6 Jul 2017 19:51:56 +0000 (+0300) Subject: self url path checking: accept value without an ending slash X-Git-Tag: 17.12~149 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=948471a44bd59fb31d9abdd2931a9eda0b5b6931;p=tt-rss.git self url path checking: accept value without an ending slash --- diff --git a/include/sanity_check.php b/include/sanity_check.php index f9f6575c..2f5315ed 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -105,7 +105,9 @@ "Please set SELF_URL_PATH to the correct value for your server (possible value: $ref_self_url_path)"); } - if (isset($_SERVER["HTTP_HOST"]) && SELF_URL_PATH != $ref_self_url_path && (!defined('_SKIP_SELF_URL_PATH_CHECKS') || !_SKIP_SELF_URL_PATH_CHECKS)) { + if (isset($_SERVER["HTTP_HOST"]) && + (!defined('_SKIP_SELF_URL_PATH_CHECKS') || !_SKIP_SELF_URL_PATH_CHECKS) && + SELF_URL_PATH != $ref_self_url_path && SELF_URL_PATH != mb_substr($ref_self_url_path, 0, mb_strlen($ref_self_url_path)-1)) { array_push($errors, "Please set SELF_URL_PATH to the correct value detected for your server: $ref_self_url_path"); }