From a3d8ce7aab14d966ef8b2b4e764cbfd16ac1f9c2 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 24 Nov 2026 09:02:35 +0100 Subject: [PATCH] SimplePie: Fix regex in clean_hash() (#9616) fix https://github.com/FreshRSS/FreshRSS/security/advisories/GHSA-8pj8-6xgr-8r8f And there was also a bug for PHP < 8.4, which does not recognise the regex quantifier `{,8192}` but only `{0,8192}` --- lib/composer.json | 2 +- lib/simplepie/simplepie/src/SimplePie.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/composer.json b/lib/composer.json index f533dfe26..27ad33d6c 100644 --- a/lib/composer.json +++ b/lib/composer.json @@ -22,7 +22,7 @@ "marienfressinaud/lib_opml": "dev-main#f0e850b6394af90b898daf0e65fcc7363457b844", "phpgt/cssxpath": "dev-master#9d416ccddb048aebd92724c4f8e92f88e3bfc412", "phpmailer/phpmailer": "7.1.1", - "simplepie/simplepie": "dev-freshrss#d7467dd6a5e59cc6f4c73d0e8d5cadc5e7c9ecfc" + "simplepie/simplepie": "dev-freshrss#1bfb15fbbdf6488b78253f76433c9268404eb3d3" }, "config": { "sort-packages": true, diff --git a/lib/simplepie/simplepie/src/SimplePie.php b/lib/simplepie/simplepie/src/SimplePie.php index 8808dbd6d..ed46dd81b 100644 --- a/lib/simplepie/simplepie/src/SimplePie.php +++ b/lib/simplepie/simplepie/src/SimplePie.php @@ -1778,7 +1778,9 @@ class SimplePie [ '#<(lastBuildDate|pubDate|updated|feedDate|dc:date|slash:comments)>[^<]+#', '#<(media:starRating|media:statistics) [^/<>]+/>#', - '#|(?=]]>))#s', // XML comments up to a max length and stops at apparent end of CDATA section + // XML comments up to a max length and stops at apparent end of CDATA section, + // or at the start of another comment (unless part of an end such as ``) + '#|(?=]]>|