diff --git a/test/api/fileUploadSpec.js b/test/api/fileUploadSpec.js index 25de93efaf6..b300b9d517a 100644 --- a/test/api/fileUploadSpec.js +++ b/test/api/fileUploadSpec.js @@ -122,7 +122,16 @@ describe('/file-upload', () => { .expect('status', 500) }) - xit('POST zip file with directory traversal payload', () => { + it('POST zip file with password protection', () => { + const file = path.resolve(__dirname, '../files/passwordProtected.zip') + const form = frisby.formData() + form.append('file', fs.createReadStream(file)) + + return frisby.post(URL + '/file-upload', { headers: { 'Content-Type': form.getHeaders()['content-type'] }, body: form }) + .expect('status', 204) + }) + + it('POST zip file with directory traversal payload', () => { const file = path.resolve(__dirname, '../files/arbitraryFileWrite.zip') const form = frisby.formData() form.append('file', fs.createReadStream(file)) diff --git a/test/files/passwordProtected.zip b/test/files/passwordProtected.zip new file mode 100644 index 00000000000..bf8dbf722fd Binary files /dev/null and b/test/files/passwordProtected.zip differ