Do not set cookies to https only #351
No reviewers
Labels
No labels
Component: User interface
Component: Wymeditor
Help wanted
Level: Difficult
Level: Easy
Level: Moderate
Pagetype: Festival
Pagetype: Mailinglist
Pagetype: Peer reviewed article
Pagetype: Text
Privacy GDPR AVG
status: has conflicts
Status: Needs changes
Status: Needs discussion
Status: Needs review
Status: Ready to merge
Status: Waiting for response
Type: Bug
Type: Enhancement
Type: Question
Usecase: De Stadsbron
Usecase: Koppelting
Usecase: MeetjeStad
Value: Coders
Value: Security
Value: Users
Value: Visitors
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
harmen/hypha!351
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "no-secure-cookies"
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?
This was only done for HTTPS-requests, but it turns out this breaks
mixed HTTP/HTTPS configurations, because browser do not store a separate
cookie for HTTP and HTTPS. So when you access the HTTPS version of a
site, the cookie is set as secure (https only) and subsequent HTTP
request will simply not get the cookie at all and cannot change the
cookie into non-secure either.
So this protection can only be enabled again when we know a site is
HTTPS-only, i.e. when #247 is implemented.
@ -31,4 +31,3 @@ini_set('session.cookie_path', $request->getRootUrlPath());ini_set('session.cookie_secure', $request->isSecure());ini_set('session.cookie_httponly', true);// This enables browser protections against CSRFWhy not put the set secure within an if statement?
@ -31,4 +31,3 @@ini_set('session.cookie_path', $request->getRootUrlPath());ini_set('session.cookie_secure', $request->isSecure());ini_set('session.cookie_httponly', true);// This enables browser protections against CSRFHow do you mean exactly? Only set the property when
isSecure()is true? That is what the old code effectively did, but that breaks mixed HTTP/HTTPS setups. Or am I misunderstanding you?Writing this, I do realize that maybe we could include http/https in the session name so really support two different sessions for http and https and have secure cookies?
I came up with a better approach, see #368.
Pull request closed