summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2016-02-02 17:04:47 +0100
committerPetr Vobornik <pvoborni@redhat.com>2016-03-01 14:16:08 +0100
commit25c53ba3fe474a36639d1c5ed30510c921203fdc (patch)
tree709a710e970c3fb296b2fbeea04d8f7106059435 /ipapython
parentdd38602fa5ea3f0a51db5458e846f3756ab74e47 (diff)
downloadfreeipa-25c53ba3fe474a36639d1c5ed30510c921203fdc.tar.gz
freeipa-25c53ba3fe474a36639d1c5ed30510c921203fdc.tar.xz
freeipa-25c53ba3fe474a36639d1c5ed30510c921203fdc.zip
cookie parser: do not fail on cookie with empty value
https://fedorahosted.org/freeipa/ticket/5709 Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/cookie.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipapython/cookie.py b/ipapython/cookie.py
index b44522157..89c3e3cd6 100644
--- a/ipapython/cookie.py
+++ b/ipapython/cookie.py
@@ -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: