Set Secure flag on session cookie in production mode (closes #5) #10
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#10
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch ":fix/issue-5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Review: PR#10 — Set Secure flag on session cookie in production mode
Overall: Clean security hardening. Correct and straightforward.
Positives
Secure: !params.Config.Debugis a clean one-liner that ties the flag to the existing debug config.Debug: false.Observations
Debug: false→Secure: true. A companion test forDebug: true→Secure: falsewould complete the coverage and prevent regressions."upaas_session"by string literal. If the cookie name changes, this test would silently pass (no cookie found →require.NotNilcatches it, so actually this is fine).SameSite: Lax+Secure: Good combination. Lax allows top-level navigations while Secure ensures HTTPS-only transmission.setupTestServicebut with configurableDebugflag) to reduce duplication if more auth tests are added.Verdict: Approve. Simple, correct security improvement.