Bug: Session cookie missing Secure flag, sent over HTTP in production #5
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#5
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Description
In
internal/service/auth/auth.go, the session cookie store is configured withoutSecure: true. The webhook URL inHandleAppDetailuseshttps://prefix, indicating the app is expected to run behind HTTPS. Without the Secure flag, the session cookie will be sent over plain HTTP connections, exposing it to network sniffing.Impact
Session hijacking via network interception when any HTTP (non-HTTPS) request is made.
Location
internal/service/auth/auth.go-New()function,store.OptionsFix
Set
Secure: truein the cookie options. Optionally make it configurable for development environments.