Uh oh!
There was an error while loading. Please reload this page.
OAuth Security Fixes: SECRET_KEY validation, session cookies, error handling - #16
Merged
Merged
Conversation
Phase 1 (Critical Security): - Fix SECRET_KEY validation to detect both 'your-secret-key' AND 'dev-secret-key' defaults - Fail hard in production (when FLASK_ENV=production or PLANEXE_PUBLIC_BASE_URL set) - Add session cookie security flags (SECURE, HTTPONLY, SAMESITE=Lax) - Update .env examples with SECRET_KEY generation command Phase 2 (Error Handling & UX): - Wrap OAuth callback in try/except for better error handling - Add profile field validation with clear error messages - Log warning when OAuth profile missing email - Update login.html to display error messages Addresses Issues #1, #3, #5, PlanExeOrg#6, PlanExeOrg#7 from OAUTH_ANALYSIS.md
neoneye
approved these changes
Feb 8, 2026
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 freeto 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
This PR implements critical OAuth security fixes and improves error handling as outlined in the OAuth security analysis.
Changes
Phase 1: Critical Security Fixes
your-secret-keyANDdev-secret-keydefaults (previously only checked one)SECURE,HTTPONLY, andSAMESITE=Laxflags to prevent session hijacking.envexamples with SECRET_KEY generation instructionsPhase 2: Error Handling & UX
Files Changed
frontend_multi_user/src/app.py- Core OAuth security and error handlingfrontend_multi_user/templates/login.html- Error message display.env.developer-example- Updated documentation.env.docker-example- Updated documentationTesting
Tested locally with:
Security Impact
Fixes the following vulnerabilities:
Related Issues
Addresses Issues #1, #3, #5, #6, #7 from OAUTH_ANALYSIS.md
Deployment Notes
PLANEXE_FRONTEND_MULTIUSER_SECRET_KEYis set to a secure random value. Generate with: