Author: Lars Michelsen <[email protected]>
Date: Fri May 25 15:14:54 2012 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Fri May 25 15:14:54 2012 +0200
Multisite auth: Do not redirect the browser on ajax calls
---
ChangeLog | 1 +
share/server/core/classes/CoreLogonMultisite.php | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b2f55e2..b0c6814 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Core
* Checking conf.d directory modification time to detect removed config files
to be able to delete the config cache in this case
+ * Multisite auth: Don't redirect the browser on ajax calls
Frontend
* Bugfix: Fixed pre-selected values in map options modify dialog
diff --git a/share/server/core/classes/CoreLogonMultisite.php
b/share/server/core/classes/CoreLogonMultisite.php
index 84b43bd..322b839 100644
--- a/share/server/core/classes/CoreLogonMultisite.php
+++ b/share/server/core/classes/CoreLogonMultisite.php
@@ -106,6 +106,10 @@ class CoreLogonMultisite extends CoreLogonModule {
}
private function redirectToLogin() {
+ // Do not redirect on ajax calls. Print out errors instead
+ if(CONST_AJAX) {
+ throw new NagVisException(l('LogonMultisite: Not authenticated.'));
+ }
// FIXME: Get the real path to multisite
header('Location:../../../check_mk/login.py?_origtarget=' .
$_SERVER['REQUEST_URI']);
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins