changeset 3498:1c113184a79b

MoinMoin.session: bug fix for http_auth for two user using one browser (invalida ting session) (Johannes & Reimar)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 13 Apr 2008 11:46:31 +0200
parents 2d257a89548d
children b18ca3046da7
files MoinMoin/session.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/session.py	Fri Apr 11 13:52:28 2008 +0100
+++ b/MoinMoin/session.py	Sun Apr 13 11:46:31 2008 +0200
@@ -423,6 +423,8 @@
     def after_auth(self, request, session_id_handler, user_obj):
         session = request.session
         if user_obj and user_obj.valid:
+            if 'user.id' in session and session['user.id'] != user_obj.id:
+                session.delete()
             session['user.id'] = user_obj.id
             session['user.auth_method'] = user_obj.auth_method
             session['user.auth_attribs'] = user_obj.auth_attribs