@@ -530,27 +530,23 @@ describe('archives', () => {
530530 } )
531531
532532 describe ( 'zip bomb protection' , ( ) => {
533- it (
534- 'should block files exceeding maxFileSize in zip' ,
535- async ( ) => {
536- await runWithTempDir ( async tempDir => {
537- const bombZipPath = path . join ( tempDir , 'bomb.zip' )
538- const zip = new AdmZip ( )
539-
540- // Create a large buffer (150MB > 100MB default)
541- const largeBuffer = Buffer . alloc ( 150 * 1024 * 1024 )
542- zip . addFile ( 'large-file.bin' , largeBuffer )
543-
544- zip . writeZip ( bombZipPath )
545-
546- const extractDir = path . join ( tempDir , 'extract' )
547- await expect ( extractZip ( bombZipPath , extractDir ) ) . rejects . toThrow (
548- / F i l e s i z e e x c e e d s l i m i t / ,
549- )
550- } , 'security-zip-bomb-file-' )
551- } ,
552- 15_000 ,
553- )
533+ it ( 'should block files exceeding maxFileSize in zip' , async ( ) => {
534+ await runWithTempDir ( async tempDir => {
535+ const bombZipPath = path . join ( tempDir , 'bomb.zip' )
536+ const zip = new AdmZip ( )
537+
538+ // Create a large buffer (150MB > 100MB default)
539+ const largeBuffer = Buffer . alloc ( 150 * 1024 * 1024 )
540+ zip . addFile ( 'large-file.bin' , largeBuffer )
541+
542+ zip . writeZip ( bombZipPath )
543+
544+ const extractDir = path . join ( tempDir , 'extract' )
545+ await expect ( extractZip ( bombZipPath , extractDir ) ) . rejects . toThrow (
546+ / F i l e s i z e e x c e e d s l i m i t / ,
547+ )
548+ } , 'security-zip-bomb-file-' )
549+ } , 15_000 )
554550
555551 it ( 'should block total size exceeding maxTotalSize in zip' , async ( ) => {
556552 await runWithTempDir ( async tempDir => {
0 commit comments