1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix infinite server crash on invalid zip import

This commit is contained in:
Chocobozzz 2025-04-03 10:27:18 +02:00
parent 0fc3f91d83
commit 71744313f0
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 6 additions and 4 deletions

View file

@ -16,6 +16,8 @@ export async function unzip (source: string, destination: string) {
yauzl.open(source, { lazyEntries: true }, (err, zipFile) => {
if (err) return rej(err)
zipFile.on('error', err => rej(err))
zipFile.readEntry()
zipFile.on('entry', async entry => {