You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns
CSRF exemption: The logout endpoint is now bypassing CSRF protection, which could allow malicious sites to force users to log out without consent. Ensure this is acceptable.
Removing the logout route from the CSRF exemption list will ensure that logout requests require a valid CSRF token, preventing potential cross‐site logout attacks. Keep logout protected by CSRF middleware.
Why: Consolidating both portal domains into a single regex reduces duplication and simplifies origin matching with minimal risk.
Low
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
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.
User description
PR Type
Bug fix, Enhancement
Description
Exempt
/auth/logoutfrom CSRF protectionAdd portal domains to CORS origin list
Changes walkthrough 📝
csrf_middleware.ts
Exempt logout from CSRF protectionfunctions/src/middlewares/csrf_middleware.ts
/auth/logoutto csrfExemptRoutesserver.ts
Allow portal domains in CORSfunctions/src/server.ts
https://portal.garudahacks.comto corsOptions.originhttps://www.portal.garudahacks.comto corsOptions.origin