mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #33504 from overleaf/bg-upgrade-yauzl
Upgrade yauzl library in web to version 3.3.0 GitOrigin-RevId: 82b4158db7a432f4257bd48402840f07801c6d07
This commit is contained in:
@@ -138,7 +138,7 @@ function _extractZipFiles(source, destination) {
|
||||
destFile,
|
||||
})
|
||||
zipfile.close() // bail out, stop reading file entries
|
||||
done(err)
|
||||
done(new InvalidZipFileError().withCause(err))
|
||||
} else {
|
||||
entryFileCount++
|
||||
zipfile.readEntry() // continue to the next file
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
"xml-crypto": "^2.1.6",
|
||||
"xml2js": "^0.6.2",
|
||||
"xregexp": "^4.3.0",
|
||||
"yauzl": "^2.10.0",
|
||||
"yauzl": "^3.3.0",
|
||||
"zod": "^4.0.17",
|
||||
"zod-validation-error": "^4.0.1"
|
||||
},
|
||||
|
||||
Binary file not shown.
@@ -250,6 +250,24 @@ describe('ProjectStructureChanges', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('uploading a project containing a filename that is too long', function () {
|
||||
let res
|
||||
|
||||
beforeEach(async function () {
|
||||
const { response } = await uploadExampleProject(
|
||||
owner,
|
||||
'test_project_with_too_long_filename.zip',
|
||||
{ allowBadStatus: true }
|
||||
)
|
||||
|
||||
res = response
|
||||
})
|
||||
|
||||
it('should fail with 422 error', function () {
|
||||
expect(res.statusCode).to.equal(422)
|
||||
})
|
||||
})
|
||||
|
||||
describe('deleting folders', function () {
|
||||
beforeEach(async function () {
|
||||
const { projectId } = await createExampleProject(owner)
|
||||
|
||||
@@ -374,7 +374,7 @@ describe('ArchiveManager', function () {
|
||||
it('should reject with an error', function (ctx) {
|
||||
expect(ctx.error)
|
||||
.to.be.instanceOf(Error)
|
||||
.and.have.property('message', 'Something went wrong')
|
||||
.and.have.property('message', 'invalid_zip_file')
|
||||
})
|
||||
|
||||
it('should close the zipfile', function (ctx) {
|
||||
@@ -411,7 +411,7 @@ describe('ArchiveManager', function () {
|
||||
it('should reject with an error', function (ctx) {
|
||||
expect(ctx.error)
|
||||
.to.be.instanceOf(Error)
|
||||
.and.have.property('message', 'Something went wrong')
|
||||
.and.have.property('message', 'invalid_zip_file')
|
||||
})
|
||||
|
||||
it('should close the zipfile', function (ctx) {
|
||||
@@ -449,7 +449,7 @@ describe('ArchiveManager', function () {
|
||||
it('should reject with an error', function (ctx) {
|
||||
expect(ctx.error)
|
||||
.to.be.instanceOf(Error)
|
||||
.and.have.property('message', 'Something went wrong')
|
||||
.and.have.property('message', 'invalid_zip_file')
|
||||
})
|
||||
it('should destroy the readstream', function (ctx) {
|
||||
ctx.readStream.destroy.called.should.equal(true)
|
||||
|
||||
Reference in New Issue
Block a user