summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclasses/rssutils.php3
-rw-r--r--include/functions.php4
2 files changed, 5 insertions, 2 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php
index a0acd986e..e730e516a 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -410,7 +410,10 @@ class RSSUtils {
$feed_data = trim($feed_data);
+ global $fetch_effective_url;
+
Debug::log("fetch done.", Debug::$LOG_VERBOSE);
+ Debug::log("effective URL (after redirects): " . clean($fetch_effective_url), Debug::$LOG_VERBOSE);
Debug::log("source last modified: " . $fetch_last_modified, Debug::$LOG_VERBOSE);
if ($feed_data && $fetch_last_modified != $stored_last_modified) {
diff --git a/include/functions.php b/include/functions.php
index 0ddf96430..e8d5ebad0 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1980,14 +1980,14 @@
if (!$tokens['host'])
return false;
- if (!in_array($tokens['scheme'], ['http', 'https']))
+ if (!in_array(strtolower($tokens['scheme']), ['http', 'https']))
return false;
if ($extended_filtering) {
if (!in_array($tokens['port'], [80, 443, '']))
return false;
- if ($tokens['host'] == 'localhost' || $tokens['host'] == '::1' || strpos($tokens['host'], '127.') === 0)
+ if (strtolower($tokens['host']) == 'localhost' || $tokens['host'] == '::1' || strpos($tokens['host'], '127.') === 0)
return false;
}