mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #18403 -- Initialized bad_cookies in SimpleCookie
Thanks Stefano Crosta for the report.
This commit is contained in:
@@ -64,6 +64,8 @@ else:
|
||||
M.set(key, real_value, coded_value)
|
||||
dict.__setitem__(self, key, M)
|
||||
except http_cookies.CookieError:
|
||||
if not hasattr(self, 'bad_cookies'):
|
||||
self.bad_cookies = set()
|
||||
self.bad_cookies.add(key)
|
||||
dict.__setitem__(self, key, http_cookies.Morsel())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user