From 347a0e9a3df77b582515058254dd5819a40f44e3 Mon Sep 17 00:00:00 2001 From: Dag Date: Mon, 20 Mar 2023 19:12:13 +0100 Subject: [PATCH] fix: patch simple_html_dom, #3309 (#3310) --- vendor/simplehtmldom/simple_html_dom.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vendor/simplehtmldom/simple_html_dom.php b/vendor/simplehtmldom/simple_html_dom.php index caa5fb4e..3fc95760 100644 --- a/vendor/simplehtmldom/simple_html_dom.php +++ b/vendor/simplehtmldom/simple_html_dom.php @@ -110,6 +110,14 @@ function str_get_html( $defaultSpanText ); + // The following two if statements are rss-bridge patch + if (empty($str)) { + throw new \Exception('Refusing to parse empty string input'); + } + if (strlen($str) > MAX_FILE_SIZE) { + throw new \Exception('Refusing to parse too big input'); + } + if (empty($str) || strlen($str) > MAX_FILE_SIZE) { $dom->clear(); return false;