Skip to content

Commit

Permalink
se o content retornar com menos de 5kb, ignorar
Browse files Browse the repository at this point in the history
  • Loading branch information
altendorfme committed Jan 7, 2025
1 parent 4baafec commit 5983fff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/inc/URLAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,11 @@ private function fixRelativeUrls($dom, $xpath, $baseUrl)
*/
private function processContent($content, $host, $url)
{
// Check content size / Verifica o tamanho do conteúdo
if (strlen($content) < 5120) { // 5KB = 5120 bytes
throw new Exception(Language::getMessage('CONTENT_ERROR')['message']);
}

$dom = new DOMDocument();
$dom->preserveWhiteSpace = true;
libxml_use_internal_errors(true);
Expand Down

0 comments on commit 5983fff

Please sign in to comment.