Pārlūkot izejas kodu

Исправлен баг "Malicious entry" - ругался на невалидные имена файлов при извлечении из zip-архива

Book Pauk 2 gadi atpakaļ
vecāks
revīzija
d9cc0ffa23
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      server/core/ZipReader.js

+ 1 - 1
server/core/ZipReader.js

@@ -14,7 +14,7 @@ class ZipReader {
         if (this.zip)
             throw new Error('Zip file is already open');
 
-         const zip = new StreamZip.async({file: zipFile});
+         const zip = new StreamZip.async({file: zipFile, skipEntryNameValidation: true});
          
         if (zipEntries)
             this.zipEntries = await zip.entries();