cookie parser: do not fail on cookie with empty value

https://fedorahosted.org/freeipa/ticket/5709

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Petr Vobornik committed 2016-03-01 14:16:08 +01:00
1 parent dd38602fa5
commit 25c53ba3fe
2 files changed
+18 -1

No files matched your search

+2 -1
View File
@@ -272,8 +272,9 @@ class Cookie(object):
if match:
key = match.group(1)
value = match.group(2)
# Double quoted value?
if value[0] == '"':
if value and value[0] == '"':
if value[-1] == '"':
value = value[1:-1]
else: