@@ -6,4 +6,4 @@ The `ZipArchiveResponse` now correctly handles corrupt ZIP archives.
|
||||
|
||||
Before this change, certain corrupt ZIP archives either cause the inflater to throw (as expected), or will hang the parser indefinitely.
|
||||
|
||||
By switching out the `zip` parsing library, we now write to a temporary directory, and load from disk which should ensure that the parsing of the `.zip` files are done correctly because `streaming` of `zip` paths is technically impossible without being able to parse the headers at the end of he file.
|
||||
By switching out the `zip` parsing library, we now write to a temporary directory, and load from disk which should ensure that the parsing of the `.zip` files are done correctly because `streaming` of `zip` paths is technically impossible without being able to parse the headers at the end of the file.
|
||||
|
||||
@@ -111,7 +111,8 @@ export class ZipArchiveResponse implements ReadTreeResponse {
|
||||
}
|
||||
|
||||
zipfile.on('entry', async (entry: Entry) => {
|
||||
if (!/\/$/.test(entry.fileName) && this.shouldBeIncluded(entry)) {
|
||||
// Check that the file is not a directory, and that is matches the filter.
|
||||
if (!entry.fileName.endsWith('/') && this.shouldBeIncluded(entry)) {
|
||||
zipfile.openReadStream(entry, async (openErr, readStream) => {
|
||||
if (openErr || !readStream) {
|
||||
reject(
|
||||
|
||||
Reference in New Issue
Block a user