diff MoinMoin/userprefs/prefs.py @ 2369:ccf996479233

fix a suid bug: force switched-to user valid
author Johannes Berg <johannes AT sipsolutions DOT net>
date Thu, 12 Jul 2007 11:41:35 +0200
parents 5fc0717a060f
children 06fabac5a1c7
line wrap: on
line diff
--- a/MoinMoin/userprefs/prefs.py	Thu Jul 12 11:41:09 2007 +0200
+++ b/MoinMoin/userprefs/prefs.py	Thu Jul 12 11:41:35 2007 +0200
@@ -203,6 +203,10 @@
 
         # save data
         theuser.save()
+        if theuser.disabled:
+            # set valid to false so the current request won't
+            # show the user as logged-in any more
+            theuser.valid = False
         self.request.user = theuser
 
         result = _("User preferences saved!")