Skip to content

Commit 6e4d845

Browse files
committed
Updated django patch for SameSite cookie settings.
- Legacy-Id: 18161
1 parent dac7a19 commit 6e4d845

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
--- django/http//response.py.orig 2020-07-08 14:34:42.776562458 +0200
2-
+++ django/http//response.py 2020-07-08 14:35:56.454687322 +0200
1+
--- django/http/response.py.orig 2020-07-08 14:34:42.776562458 +0200
2+
+++ django/http/response.py 2020-07-08 14:35:56.454687322 +0200
33
@@ -197,8 +197,8 @@
44
if httponly:
55
self.cookies[key]['httponly'] = True
66
if samesite:
77
- if samesite.lower() not in ('lax', 'strict'):
88
- raise ValueError('samesite must be "lax" or "strict".')
99
+ if samesite.lower() not in ('lax', 'strict', 'none'):
10-
+ raise ValueError('samesite must be "lax", "strict", or "none".')
10+
+ raise ValueError('samesite must be "lax", "strict", or "none", not "%s".' % samesite)
1111
self.cookies[key]['samesite'] = samesite
1212

1313
def setdefault(self, key, value):

0 commit comments

Comments
 (0)