fix: add auth middleware to POST /api/payments endpoint#1985
Open
lismilema-hue wants to merge 3 commits into
Open
fix: add auth middleware to POST /api/payments endpoint#1985lismilema-hue wants to merge 3 commits into
lismilema-hue wants to merge 3 commits into
Conversation
Created original 128x128 pixel art of a cyberpunk fox character under /assets/pixel-art/ as required by the issue. - Theme: Cyberpunk fox with neon glow, moon, stars, cityscape - Format: PNG, 128x128 pixels (meets 64x64 minimum) - Submitted per acceptance criteria Closes SecureBananaLabs#80
An original 4-stanza poem about the art of debugging and bug hunting, written in the spirit of SecureBananaLabs' bug bounty program.
- Import authMiddleware and apply it to the POST /api/payments route - Add tests verifying 401 responses without auth or with invalid token Closes SecureBananaLabs#1983 /claim SecureBananaLabs#743
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
authMiddlewareto thePOST /api/paymentsendpoint to prevent unauthenticated payment creation.Changes
apps/api/src/routes/paymentRoutes.js— importedauthMiddlewareand added it as middleware beforecreatePaymentapps/api/src/tests/payments.test.js— added tests verifying:Closes #1983
/claim #743