Author:   Lars Michelsen <[email protected]>
Date:     Sun Nov 27 19:13:38 2011 +0100
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Sun Nov 27 19:13:38 2011 +0100

multisite logon: Now really checking if the secret file exists

---

 share/server/core/classes/CoreLogonMultisite.php |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/share/server/core/classes/CoreLogonMultisite.php 
b/share/server/core/classes/CoreLogonMultisite.php
index 9e75477..78c007b 100644
--- a/share/server/core/classes/CoreLogonMultisite.php
+++ b/share/server/core/classes/CoreLogonMultisite.php
@@ -29,13 +29,13 @@ class CoreLogonMultisite extends CoreLogonModule {
 
     public function __construct() {
         $this->htpasswdPath = cfg('global', 'logon_multisite_htpasswd');
+        $this->secretPath   = cfg('global', 'logon_multisite_secret');
+
         if(!file_exists($this->htpasswdPath)) {
             throw new NagVisException(l('LogonMultisite: The htpasswd file 
&quot;[PATH]&quot; does not exist.',
                           array('PATH' => $this->htpasswdPath)));
         }
-
-        $this->secretPath   = cfg('global', 'logon_multisite_secret');
-        if(!file_exists($this->htpasswdPath)) {
+        if(!file_exists($this->secretPath)) {
             throw new NagVisException(l('LogonMultisite: The auth secret file 
&quot;[PATH]&quot; does not exist.',
                           array('PATH' => $this->secretPath)));
         }
@@ -85,6 +85,8 @@ class CoreLogonMultisite extends CoreLogonModule {
     }
 
     private function checkAuth() {
+        // Loop all cookies trying to fetch a valid authentication
+        // cookie for this installation
         foreach(array_keys($_COOKIE) AS $cookieName) {
             if(substr($cookieName, 0, 5) != 'auth_') {
                 continue;


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to