update_rss_feed: log effective URL after fetching
validate_url: treat scheme as case-insensitive
This commit is contained in:
parent
486f1d84ed
commit
4785f21316
|
@ -410,7 +410,10 @@ class RSSUtils {
|
||||||
|
|
||||||
$feed_data = trim($feed_data);
|
$feed_data = trim($feed_data);
|
||||||
|
|
||||||
|
global $fetch_effective_url;
|
||||||
|
|
||||||
Debug::log("fetch done.", Debug::$LOG_VERBOSE);
|
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);
|
Debug::log("source last modified: " . $fetch_last_modified, Debug::$LOG_VERBOSE);
|
||||||
|
|
||||||
if ($feed_data && $fetch_last_modified != $stored_last_modified) {
|
if ($feed_data && $fetch_last_modified != $stored_last_modified) {
|
||||||
|
|
|
@ -1980,14 +1980,14 @@
|
||||||
if (!$tokens['host'])
|
if (!$tokens['host'])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!in_array($tokens['scheme'], ['http', 'https']))
|
if (!in_array(strtolower($tokens['scheme']), ['http', 'https']))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ($extended_filtering) {
|
if ($extended_filtering) {
|
||||||
if (!in_array($tokens['port'], [80, 443, '']))
|
if (!in_array($tokens['port'], [80, 443, '']))
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue