summaryrefslogtreecommitdiff
path: root/paste/auth
diff options
context:
space:
mode:
authorpjenvey <devnull@localhost>2008-10-10 01:11:17 +0000
committerpjenvey <devnull@localhost>2008-10-10 01:11:17 +0000
commitf4f9e198e7ab71816233a30caf8b1926e3de72f5 (patch)
treef7ece8943e1bd95aa65509f77a7704bb964a028a /paste/auth
parent75a72177136f1cf56381e4838fd74105d683ab39 (diff)
downloadpaste-f4f9e198e7ab71816233a30caf8b1926e3de72f5.tar.gz
fix auth cookie generating bad headers
thanks Alberto Valverde, jnelson, Jorge Vargas, Graham Dumpleton
Diffstat (limited to 'paste/auth')
-rw-r--r--paste/auth/cookie.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/paste/auth/cookie.py b/paste/auth/cookie.py
index 5bc48cc..99f37e0 100644
--- a/paste/auth/cookie.py
+++ b/paste/auth/cookie.py
@@ -140,7 +140,8 @@ class AuthCookieSigner(object):
cookie = base64.encodestring(
hmac.new(self.secret, content, sha1).digest() +
make_time(time.time() + 60*self.timeout) +
- content).replace("/", "_").replace("=", "~")
+ content)[:-1]
+ cookie = cookie.replace("/", "_").replace("=", "~")
if len(cookie) > self.maxlen:
raise CookieTooLarge(content, cookie)
return cookie