diff options
| author | e0ne <e0ne@e0ne.info> | 2013-09-09 12:40:37 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-10 08:26:54 -0400 |
| commit | f2a44528825ac07ca28c8bb7dc01b4375df8dc2c (patch) | |
| tree | 6eeef84ddd28366a626669d0a79ad277ef51f8c0 /django/http | |
| parent | 7008ed61c519f93a9b6c5c547ad718ad2deb959b (diff) | |
Fixed #18403 -- Initialized bad_cookies in SimpleCookie
Thanks Stefano Crosta for the report.
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/cookie.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/http/cookie.py b/django/http/cookie.py index 40cf58def8..eef0c35759 100644 --- a/django/http/cookie.py +++ b/django/http/cookie.py @@ -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()) |
