]> git.wh0rd.org - tt-rss.git/commitdiff
self url path checking: accept value without an ending slash
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 6 Jul 2017 19:51:56 +0000 (22:51 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 6 Jul 2017 19:51:56 +0000 (22:51 +0300)
include/sanity_check.php

index f9f6575c898a2ea23f7a8e6593242ba22442b264..2f5315edf622a4a8fa4615c039eb9ccfe1d0f912 100755 (executable)
                                                "Please set SELF_URL_PATH to the correct value for your server (possible value: <b>$ref_self_url_path</b>)");
                        }
 
-                       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: <b>$ref_self_url_path</b>");
                        }