Prechádzať zdrojové kódy

SimplePie: XML_OPTION_PARSE_HUGE (#8894)

* https://github.com/FreshRSS/FreshRSS/pull/8710
* https://github.com/simplepie/simplepie/pull/977

Fix https://github.com/FreshRSS/FreshRSS/issues/8516

Co-authored-by: Kidd Lee <LeeXiaolan@users.noreply.github.com>
Alexandre Alapetite 1 deň pred
rodič
commit
a499778e12

+ 1 - 1
lib/composer.json

@@ -18,7 +18,7 @@
 		"marienfressinaud/lib_opml": "dev-main#f0e850b6394af90b898daf0e65fcc7363457b844",
 		"phpgt/cssxpath": "v1.5.0",
 		"phpmailer/phpmailer": "7.0.2",
-		"simplepie/simplepie": "dev-freshrss#33e4bcf5685192b0fa4c9819f0813b47c3d22424"
+		"simplepie/simplepie": "dev-freshrss#bccd36e9eb1ff54133e6199200b17b5e27b4d7ab"
 	},
 	"config": {
 		"sort-packages": true,

+ 3 - 0
lib/simplepie/simplepie/src/Parser.php

@@ -139,6 +139,9 @@ class Parser implements RegistryAware
             $xml = xml_parser_create_ns($this->encoding, $this->separator);
             xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1);
             xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0);
+            if (defined('XML_OPTION_PARSE_HUGE')) {
+                xml_parser_set_option($xml, XML_OPTION_PARSE_HUGE, 1);
+            }
             xml_set_character_data_handler($xml, [$this, 'cdata']);
             xml_set_element_handler($xml, [$this, 'tag_open'], [$this, 'tag_close']);