Module: check_mk
Branch: master
Commit: 406d78571cdcad3191efd5894f01bdc1f0228fe8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=406d78571cdcad…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 23 08:44:58 2012 +0200
FIX: fixed bug showing only sidebar after re-login in multisite
---
ChangeLog | 1 +
web/htdocs/login.py | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c0df5de..0bac8de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,6 +41,7 @@
* FIX: fixed localization of general permissions
* FIX: show multisite warning messages even after page reload
* FIX: fix bug in Age ValueSpec: days had been ignored
+ * FIX: fixed bug showing only sidebar after re-login in multisite
Livecheck:
* FIX: Compile livecheck also if diet libc is missing
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index b75bf55..aff6fa1 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -223,6 +223,13 @@ def normal_login_page(called_directly = True):
if not origtarget and not html.req.myfile == 'login':
origtarget = html.makeuri([])
+ # When e.g. the password of a user is changed and the first frame that recognizes
the
+ # non matching cookies is the sidebar it redirects the user to side.py while
removing
+ # the frameset. This is not good. Instead of this redirect the user to the index
page.
+ if html.req.myfile == 'side':
+ html.immediate_browser_redirect(0.1, 'index.py')
+ return apache.OK
+
# Never allow the login page to be opened in a frameset. Redirect top page to login
page.
# This will result in a full screen login page.
html.javascript('''if(top != self) {
@@ -232,7 +239,7 @@ def normal_login_page(called_directly = True):
# When someone calls the login page directly and is already authed redirect to main
page
if html.req.myfile == 'login' and check_auth() != '':
html.immediate_browser_redirect(0.5, origtarget and origtarget or
'index.py')
- return
+ return apache.OK
html.write("<div id=login>")
html.write("<img id=login_window
src=\"images/login_window.png\">")