From 5bb8dad63187ddd8d83d38197813596817fa7abd Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 12 Nov 2019 07:11:10 +0300 Subject: [PATCH] is_gzipped: don't try to strpos() over entire buffer --- classes/rssutils.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/rssutils.php b/classes/rssutils.php index aad45a1aa..1904176f8 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -1551,7 +1551,8 @@ class RSSUtils { } static function is_gzipped($feed_data) { - return mb_strpos($feed_data, "\x1f" . "\x8b" . "\x08", 0, "US-ASCII") === 0; + return strpos(substr($feed_data, 0, 3), + "\x1f" . "\x8b" . "\x08", 0) === 0; } static function load_filters($feed_id, $owner_uid) {