aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Url.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-02-04 15:41:20 +0100
committerGravatar GitHub <noreply@github.com> 2022-02-04 15:41:20 +0100
commit88b934da8bec70da1400525748336c0b71864b1a (patch)
treef5396060578dc05f6f0aee206387b479db2dccb7 /lib/Minz/Url.php
parent60d96652dda458aeae78fd25f7c5f6818d518ef1 (diff)
Fix root redirection (#4167)
* Fix root redirection #fix https://github.com/FreshRSS/FreshRSS/issues/4126 * Smarter
Diffstat (limited to 'lib/Minz/Url.php')
-rw-r--r--lib/Minz/Url.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php
index 06390c4c6..be3184b40 100644
--- a/lib/Minz/Url.php
+++ b/lib/Minz/Url.php
@@ -28,7 +28,7 @@ class Minz_Url {
$url_string = Minz_Request::getBaseUrl();
if (strlen($url_string) < strlen('http://a.bc')) {
$url_string = Minz_Request::guessBaseUrl();
- if (PUBLIC_RELATIVE === '..') {
+ if (PUBLIC_RELATIVE === '..' && preg_match('%' . PUBLIC_TO_INDEX_PATH . '(/|$)%', $url_string)) {
//TODO: Implement proper resolver of relative parts such as /test/./../
$url_string = dirname($url_string);
}