summaryrefslogtreecommitdiff
path: root/paste/auth
diff options
context:
space:
mode:
authorianb <devnull@localhost>2009-03-05 19:00:57 +0000
committerianb <devnull@localhost>2009-03-05 19:00:57 +0000
commitc1cde173851d9713fb0a27f7b6683364ec861940 (patch)
tree713f0cd5366826b68c6c4b05f142cfe39c60acd8 /paste/auth
parent97ed931710ae4f3a39360abf006d38b06b533682 (diff)
downloadpaste-c1cde173851d9713fb0a27f7b6683364ec861940.tar.gz
Make cookies expire on logout
Diffstat (limited to 'paste/auth')
-rw-r--r--paste/auth/auth_tkt.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/paste/auth/auth_tkt.py b/paste/auth/auth_tkt.py
index 1b26f9c..23b0e82 100644
--- a/paste/auth/auth_tkt.py
+++ b/paste/auth/auth_tkt.py
@@ -344,12 +344,13 @@ class AuthTKTMiddleware(object):
def logout_user_cookie(self, environ):
cur_domain = environ.get('HTTP_HOST', environ.get('SERVER_NAME'))
wild_domain = '.' + cur_domain
+ expires = 'Sat, 01-Jan-2000 12:00:00 GMT'
cookies = [
- ('Set-Cookie', '%s=""; Path=/' % self.cookie_name),
- ('Set-Cookie', '%s=""; Path=/; Domain=%s' %
- (self.cookie_name, cur_domain)),
- ('Set-Cookie', '%s=""; Path=/; Domain=%s' %
- (self.cookie_name, wild_domain)),
+ ('Set-Cookie', '%s=""; Expires="%s"; Path=/' % (self.cookie_name, expires)),
+ ('Set-Cookie', '%s=""; Expires="%s"; Path=/; Domain=%s' %
+ (self.cookie_name, expires, cur_domain)),
+ ('Set-Cookie', '%s=""; Expires="%s"; Path=/; Domain=%s' %
+ (self.cookie_name, expires, wild_domain)),
]
return cookies