Skip to content

Commit

Permalink
Use samesite lax for portal cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
Josue-T authored and zamentur committed Feb 22, 2025
1 parent f84d092 commit 318c96a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/authenticators/ldap_ynhuser.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,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 @@ -331,7 +331,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

0 comments on commit 318c96a

Please sign in to comment.