From 27d2b88a19345dfc665dc086d3c2b2e4547e1b7f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 23 May 2015 02:23:38 +0200 Subject: Minz getBaseUrl correction and RSS template bug https://github.com/FreshRSS/FreshRSS/issues/848 Corrections in Minz (HTTP_HOST was not sanitized, getURI() was never used and not working anyway with absolute base_url) $this->url was not defined in rss.phtml --- lib/Minz/Url.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'lib/Minz/Url.php') diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php index af555a277..a47d8f1a6 100644 --- a/lib/Minz/Url.php +++ b/lib/Minz/Url.php @@ -10,7 +10,6 @@ class Minz_Url { * $url['c'] = controller * $url['a'] = action * $url['params'] = tableau des paramètres supplémentaires - * $url['protocol'] = protocole à utiliser (http par défaut) * ou comme une chaîne de caractère * @param $encodage pour indiquer comment encoder les & (& ou & pour html) * @return l'url formatée @@ -25,14 +24,7 @@ class Minz_Url { $url_string = ''; if ($absolute) { - if ($isArray && isset ($url['protocol'])) { - $protocol = $url['protocol']; - } elseif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { - $protocol = 'https:'; - } else { - $protocol = 'http:'; - } - $url_string = $protocol . '//' . Minz_Request::getDomainName () . Minz_Request::getBaseUrl (); + $url_string = Minz_Request::getBaseUrl(PUBLIC_TO_INDEX_PATH); } else { $url_string = $isArray ? '.' : PUBLIC_RELATIVE; } -- cgit v1.2.3 From a5a24108ef923c47422f6b10db57863739a996cd Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 30 May 2015 19:25:20 +0200 Subject: Minz URL encoding bug See also https://github.com/FreshRSS/FreshRSS/pull/849 --- lib/Minz/Url.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Minz/Url.php') diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php index a47d8f1a6..879077d0f 100644 --- a/lib/Minz/Url.php +++ b/lib/Minz/Url.php @@ -18,7 +18,7 @@ class Minz_Url { $isArray = is_array($url); if ($isArray) { - $url = self::checkUrl ($url); + $url = self::checkUrl($url); } $url_string = ''; @@ -30,9 +30,9 @@ class Minz_Url { } if ($isArray) { - $url_string .= self::printUri ($url, $encodage); + $url_string .= self::printUri($url, $encodage); } else { - $url_string .= $url; + $url_string = Minz_Helper::htmlspecialchars_utf8($url_string . $url); } return $url_string; -- cgit v1.2.3