fix: patch simple_html_dom, #3309 (#3310)

This commit is contained in:
Dag 2023-03-20 19:12:13 +01:00 committed by GitHub
parent 4c3ebb312d
commit 347a0e9a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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;