Skip to content

fix: add authentication check in route.js (CWE-287) - #58

Open
anupamme wants to merge 1 commit into
ReDI-School:mainfrom
anupamme:fix-repo-fullstack-bootcamp-cwe-287-favorites-auth
Open

anupamme wants to merge 1 commit into
ReDI-School:mainfrom
anupamme:fix-repo-fullstack-bootcamp-cwe-287-favorites-auth

Conversation

@anupamme

@anupamme anupamme commented Oct 5, 2026

Copy link
Copy Markdown

Protected API endpoints (favorites, reactions, comments) accept 'author' field directly from request body without server-side authentication verification. No JWT, session cookie, or token validation is implemented, allowing complete impersonation of any user. The affected code is projects/02_twitter_clone/06_milestone/code_exercice_comments/app/api/favorites/route.js:24. This change is the fix I would apply.

Reference: CWE-287

What changed

  • projects/02_twitter_clone/06_milestone/code_exercice_comments/app/api/favorites/route.js

Verification

No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
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