Skip to content

Commit

Permalink
Merge pull request #318 from getodk/ignore-keepalive
Browse files Browse the repository at this point in the history
Ignore keepalive file when restoring backup
  • Loading branch information
issa-tseng committed Dec 25, 2020
2 parents 37962b8 + e21e8a6 commit a33bc6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/task/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ const decryptFromArchive = (archivePath, directory, passphrase = '') =>
// first we read all the records in the zipfile central directory. we check
// for various zipbomb redflags and reject if we see any.
zipfile.on('entry', (entry) => {
if (entry.fileName === 'keepalive') {
zipfile.readEntry();
return;
}

entries.push(entry);
totalBytes += entry.uncompressedSize;
if (entries.length > 100)
Expand Down

0 comments on commit a33bc6f

Please sign in to comment.