From b8b69b1698f9a27f5ad8e7d30ec59429f410d3da Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 8 Jul 2020 13:46:34 +0000 Subject: [PATCH] Added a patch for Django to permit cookie 'samesite' setting to be explicitly set to 'None'. - Legacy-Id: 18138 --- patch/add-django-http-cookie-value-none.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patch/add-django-http-cookie-value-none.patch diff --git a/patch/add-django-http-cookie-value-none.patch b/patch/add-django-http-cookie-value-none.patch new file mode 100644 index 000000000..78ad3f1dc --- /dev/null +++ b/patch/add-django-http-cookie-value-none.patch @@ -0,0 +1,13 @@ +--- django/http//response.py.orig 2020-07-08 14:34:42.776562458 +0200 ++++ django/http//response.py 2020-07-08 14:35:56.454687322 +0200 +@@ -197,8 +197,8 @@ + if httponly: + self.cookies[key]['httponly'] = True + if samesite: +- if samesite.lower() not in ('lax', 'strict'): +- raise ValueError('samesite must be "lax" or "strict".') ++ if samesite.lower() not in ('lax', 'strict', 'none'): ++ raise ValueError('samesite must be "lax", "strict", or "none".') + self.cookies[key]['samesite'] = samesite + + def setdefault(self, key, value):