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:
parent
0fc3f91d83
commit
71744313f0
3 changed files with 6 additions and 4 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue