Skip to content

Upload endpoint lacks authentication — unauthenticated file uploads allowed#3330

Open
cyrillical00 wants to merge 1 commit into
SecureBananaLabs:mainfrom
cyrillical00:bounty-bot/bounty-github-SecureBananaLabs-bug-boun-9f4370
Open

Upload endpoint lacks authentication — unauthenticated file uploads allowed#3330
cyrillical00 wants to merge 1 commit into
SecureBananaLabs:mainfrom
cyrillical00:bounty-bot/bounty-github-SecureBananaLabs-bug-boun-9f4370

Conversation

@cyrillical00
Copy link
Copy Markdown

Closes the bounty.

Summary

Summary: Add authMiddleware to the upload route and create apps/api/package.json so the workspace is recognized by npm.

Reasoning: The prior patch correctly added authMiddleware to the upload POST route, and it applied cleanly. The test failure was caused by npm not finding the apps/api workspace because no package.json existed there. Adding a minimal package.json with name 'api' makes npm recognize it as a workspace. The route fix itself is the security fix: unauthenticated requests will now be rejected by authMiddleware before reaching the multer/uploadFile handlers.

Top blockers: The authMiddleware file at apps/api/src/middleware/authMiddleware.js was not shown; assuming it exists and exports authMiddleware as the codebase implies.

Test commands

  • npm install
  • npm run test -w apps/api

Submitted via bounty-bot. Confidence: medium.

Summary: Add authMiddleware to the upload route and create apps/api/package.json so the workspace is recognized by npm.

Reasoning: The prior patch correctly added authMiddleware to the upload POST route, and it applied cleanly. The test failure was caused by npm not finding the apps/api workspace because no package.json existed there. Adding a minimal package.json with name 'api' makes npm recognize it as a workspace. The route fix itself is the security fix: unauthenticated requests will now be rejected by authMiddleware before reaching the multer/uploadFile handlers.

Top blockers: The authMiddleware file at apps/api/src/middleware/authMiddleware.js was not shown; assuming it exists and exports authMiddleware as the codebase implies.

Drafted by bounty-bot for SecureBananaLabs#1771
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant