Module: check_mk
Branch: master
Commit: c2fb55af0b565f2de2d06c56f56cfd3ece78d686
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c2fb55af0b565f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 25 11:57:03 2011 +0100
Changed var reset
---
web/htdocs/login.py | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index b84bb66..8904b89 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -133,18 +133,21 @@ def login_page():
# c) Show the real requested page (No redirect needed)
set_auth_cookie(username, users[username])
- # Remove login vars to hide them from the next page handler
- del html.req.vars['_username']
- del html.req.vars['_password']
- del html.req.vars['_login']
- del html.req.vars['_origin']
-
# Use redirects for URLs or simply execute other handlers for
# mulitsite modules
if '/' in origin:
html.set_http_header('Location', origin)
raise apache.SERVER_RETURN, apache.HTTP_MOVED_TEMPORARILY
else:
+ # Remove login vars to hide them from the next page handler
+ try:
+ del html.req.vars['_username']
+ del html.req.vars['_password']
+ del html.req.vars['_login']
+ del html.req.vars['_origin']
+ except:
+ pass
+
return (username, origin)
else:
raise MKUserError(None, _('Invalid credentials.'))