From 1d02214e1253b86622262988ad7ecce1f5647006 Mon Sep 17 00:00:00 2001 From: Dag Date: Sat, 4 Jan 2025 19:43:48 +0100 Subject: feat: extract simple_html_dom max_file_size to config (#4395) --- lib/simplehtmldom/simple_html_dom.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/simplehtmldom') diff --git a/lib/simplehtmldom/simple_html_dom.php b/lib/simplehtmldom/simple_html_dom.php index 170f6fb0..e8b3a727 100644 --- a/lib/simplehtmldom/simple_html_dom.php +++ b/lib/simplehtmldom/simple_html_dom.php @@ -114,8 +114,9 @@ function str_get_html( 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 (strlen($str) > Configuration::getConfig('system', 'max_file_size')) { + throw new \Exception('simple_html_dom: Refusing to parse too big input: ' . strlen($str)); } return $dom->load($str, $lowercase, $stripRN); -- cgit v1.2.3