Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check upload size before handling zip files #2417

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

criticic
Copy link

Description

The route in server.ts was updated to call checkUploadSize before handleZipFileUpload, ensuring the size check middleware executes for all file types, including .zip files.

Resolved or fixed issue: #2404

Affirmation

@@ -292,7 +292,7 @@

app.use(bodyParser.urlencoded({ extended: true }))
/* File Upload */
app.post('/file-upload', uploadToMemory.single('file'), ensureFileIsPassed, metrics.observeFileUploadMetricsMiddleware(), handleZipFileUpload, checkUploadSize, checkFileType, handleXmlUpload)
app.post('/file-upload', uploadToMemory.single('file'), ensureFileIsPassed, metrics.observeFileUploadMetricsMiddleware(), checkUploadSize, checkFileType, handleZipFileUpload, handleXmlUpload)

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a file system access
, but is not rate-limited.
@bkimminich bkimminich merged commit 4266728 into juice-shop:develop Jan 1, 2025
33 of 34 checks passed
Copy link

cypress bot commented Jan 1, 2025

OWASP Juice Shop    Run #638

Run Properties:  status check passed Passed #638  •  git commit 42667286bb: check upload size before handling zip files (#2417)
Project OWASP Juice Shop
Branch Review develop
Run status status check passed Passed #638
Run duration 36m 35s
Commit git commit 42667286bb: check upload size before handling zip files (#2417)
Committer Sagnik Mandal
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 18
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 214
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants