summaryrefslogtreecommitdiff
path: root/Mailman/SecurityManager.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/SecurityManager.py')
-rw-r--r--Mailman/SecurityManager.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Mailman/SecurityManager.py b/Mailman/SecurityManager.py
index 97f81b459..83204f887 100644
--- a/Mailman/SecurityManager.py
+++ b/Mailman/SecurityManager.py
@@ -112,11 +112,13 @@ class SecurityManager:
# the list that we expect. The kludge given here (slightly modified)
# was initially provided by Evaldas Auryla <evaldas.auryla@pheur.org>
#
-## self.LogMsg('debug', 'Browser Cookie: ' + cookiedata)
keylen = len(key)
- if cookiedata[keylen+1] <> '"' and cookiedata[-1] <> '"':
- cookiedata = key + '="' + cookiedata[keylen+1:] + '"'
-## self.LogMsg('debug', 'Using Cookie: ' + cookiedata)
+ try:
+ if cookiedata[keylen+1] <> '"' and cookiedata[-1] <> '"':
+ cookiedata = key + '="' + cookiedata[keylen+1:] + '"'
+ except IndexError:
+ # cookiedata got truncated somehow; just let it fail normally
+ pass
c = Cookie.Cookie(cookiedata)
if not c.has_key(key):
return 0