Skip to content

Commit f3c4dbf

Browse files
authored
Merge pull request #48 from FreshRSS/fix-regex-greedy
Fix regex backtrack limit in clean_hash()
2 parents 3cdee69 + c39a8ec commit f3c4dbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SimplePie.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ private function clean_hash(string $rss): string
16951695
[
16961696
'#<(lastBuildDate|pubDate|updated|feedDate|dc:date|slash:comments)>[^<]+</\\1>#',
16971697
'#<(media:starRating|media:statistics) [^/<>]+/>#',
1698-
'#<!--.+?-->#s',
1698+
'#<!--.{,8192}?(-->|(?=]]>))#s', // XML comments up to a max length and stops at apparent end of CDATA section
16991699
],
17001700
'',
17011701
$stream_data

0 commit comments

Comments
 (0)