A free, self-hostable news aggregator…
Fix SimplePie autodiscovery for text/xml HTML pages
Alexandre Alapetitea37484fd2fee
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a1fe033bc..f13922837 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,6 +12,8 @@* Support custom ports `localhost:3306` for database servers [#1241](https://github.com/FreshRSS/FreshRSS/issues/1241)* Bug fixing* Correction of bugs related CSRF tokens introduced in version 1.5.0 [#1253](https://github.com/FreshRSS/FreshRSS/issues/1253), [44f22ab](https://github.com/FreshRSS/FreshRSS/pull/1261/commits/d9bf9b2c6f0b2cc9dec3b638841b7e3040dcf46f)+* SimplePie+ * Fix auto-discovery of RSS feeds in Web pages served as `text/xml` [#1264](https://github.com/FreshRSS/FreshRSS/issues/1264)* Security* Prevent `<a target="_blank">` attacks with `window.opener` [#1245](https://github.com/FreshRSS/FreshRSS/issues/1245)* UIdiff --git a/lib/SimplePie/SimplePie/Content/Type/Sniffer.php b/lib/SimplePie/SimplePie/Content/Type/Sniffer.phpindex a32f47f59..daec3607d 100644--- a/lib/SimplePie/SimplePie/Content/Type/Sniffer.php+++ b/lib/SimplePie/SimplePie/Content/Type/Sniffer.php@@ -109,9 +109,7 @@ class SimplePie_Content_Type_Sniffer{return $this->unknown();}- elseif (substr($official, -4) === '+xml'- || $official === 'text/xml'- || $official === 'application/xml')+ elseif (substr($official, -4) === '+xml'){return $official;}@@ -126,7 +124,9 @@ class SimplePie_Content_Type_Snifferreturn $official;}}- elseif ($official === 'text/html')+ elseif ($official === 'text/html'+ || $official === 'text/xml'+ || $official === 'application/xml'){return $this->feed_or_html();}