Module: check_mk
Branch: master
Commit: 0d034d6bed5dd860817276fe772648249d55ac96
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0d034d6bed5dd8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Apr 19 15:47:37 2012 +0200
FIX: Fixed login redirection problem after relogging
---
ChangeLog | 1 +
web/htdocs/login.py | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 37ebee1..156f9b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
are preferred over *.py if existing
* View Editor: Fixed jump to top of the page after moving painters during
editing views
+ * FIX: Fixed login redirection problem after relogging
Checks & Agents:
* FIX: Made logwatch parsing mechanism a little more robust
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index ba371f2..0d7b2d1 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -224,16 +224,17 @@ def normal_login_page(called_directly = True):
if not origtarget and not html.req.myfile == 'login':
origtarget = html.makeuri([])
+ # 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) {
+ window.top.location.href = location;
+}''')
+
# 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
- # Never allow the login page to be opened in a frameset. Redirect top page to login
page
- html.javascript('''if(top != self) {
- window.top.location.href = location;
-}''')
-
html.write("<div id=login>")
html.write("<img id=login_window
src=\"images/login_window.png\">")
html.write("<div id=version>%s</div>" %
defaults.check_mk_version)