1
0
Fork 0

Tweak error message to include the package name, refs #12369

main
Jordi Boggiano 2025-04-16 13:12:50 +02:00
parent 79cebec579
commit dcaaa1bc7b
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -229,11 +229,11 @@ class ZipDownloader extends ArchiveDownloader
}
$totalSize += $stat['size'];
if ($stat['size'] > $stat['comp_size'] * 200) {
throw new \RuntimeException('Invalid zip file with compression ratio >99% (possible zip bomb)');
throw new \RuntimeException('Invalid zip file for "'.$package->getName().'" with compression ratio >99% (possible zip bomb)');
}
}
if ($archiveSize !== false && $totalSize > $archiveSize * 100 && $totalSize > 50*1024*1024) {
throw new \RuntimeException('Invalid zip file with compression ratio >99% (possible zip bomb)');
throw new \RuntimeException('Invalid zip file for "'.$package->getName().'" with compression ratio >99% (possible zip bomb)');
}
}