Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use samesite lax for portal cookies #2018

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/authenticators/ldap_ynhuser.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def set_session_cookie(self, infos):
secure=True,
httponly=True,
path="/",
samesite="strict" if not is_dev else None,
samesite="lax" if not is_dev else None,
domain=f".{request.get_header('host')}",
max_age=SESSION_VALIDITY
- 600, # remove 1 minute such that cookie expires on the browser slightly sooner on browser side, just to help desimbuigate edge case near the expiration limit
Expand Down Expand Up @@ -305,7 +305,7 @@ def get_session_cookie(self, decrypt_pwd=False):
secure=True,
httponly=True,
path="/",
samesite="strict" if not is_dev else None,
samesite="lax" if not is_dev else None,
domain=f".{request.get_header('host')}",
max_age=SESSION_VALIDITY
- 600, # remove 1 minute such that cookie expires on the browser slightly sooner on browser side, just to help desimbuigate edge case near the expiration limit
Expand Down
Loading