Skip to content

Commit 5983fff

Browse files
committed
se o content retornar com menos de 5kb, ignorar
1 parent 4baafec commit 5983fff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/inc/URLAnalyzer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,11 @@ private function fixRelativeUrls($dom, $xpath, $baseUrl)
521521
*/
522522
private function processContent($content, $host, $url)
523523
{
524+
// Check content size / Verifica o tamanho do conteúdo
525+
if (strlen($content) < 5120) { // 5KB = 5120 bytes
526+
throw new Exception(Language::getMessage('CONTENT_ERROR')['message']);
527+
}
528+
524529
$dom = new DOMDocument();
525530
$dom->preserveWhiteSpace = true;
526531
libxml_use_internal_errors(true);

0 commit comments

Comments
 (0)