[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: * Fixed "SilentAuth" login issue

git at icinga.org git at icinga.org
Wed Jul 13 07:55:56 CEST 2011


Module: icinga-web
Branch: jmosshammer/default
Commit: b6e9eb9a3a4960b8c4127118efd460bb4d87424a
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=b6e9eb9a3a4960b8c4127118efd460bb4d87424a

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Jul  7 13:43:37 2011 +0200

* Fixed "SilentAuth" login issue
* Disabled silent user could not login
* Fixed session creation for silent providers

---

 .../actions/Login/SilentAuthAction.class.php       |    8 ++------
 .../AppKit/models/Auth/DispatchModel.class.php     |    5 +++++
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/modules/AppKit/actions/Login/SilentAuthAction.class.php b/app/modules/AppKit/actions/Login/SilentAuthAction.class.php
index ba68aad..120bff0 100644
--- a/app/modules/AppKit/actions/Login/SilentAuthAction.class.php
+++ b/app/modules/AppKit/actions/Login/SilentAuthAction.class.php
@@ -43,16 +43,12 @@ class AppKit_Login_SilentAuthAction extends AppKitBaseAction
 						$this->setAttribute('authenticated', true);
 					}
 					catch (AgaviSecurityException $e) {
-
+						return 'Error';
 					}
 				}
 			}
 		}
 
-		if ($enable_dialog !== true) {
-			return 'Error';
-		}
-
 		return $this->getDefaultViewName();
 	}
 
@@ -61,4 +57,4 @@ class AppKit_Login_SilentAuthAction extends AppKitBaseAction
 	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/app/modules/AppKit/models/Auth/DispatchModel.class.php b/app/modules/AppKit/models/Auth/DispatchModel.class.php
index 8ebd64a..bca7663 100755
--- a/app/modules/AppKit/models/Auth/DispatchModel.class.php
+++ b/app/modules/AppKit/models/Auth/DispatchModel.class.php
@@ -125,6 +125,11 @@ class AppKit_Auth_DispatchModel extends AppKitBaseModel implements AgaviISinglet
 
 			$this->log('Auth.Dispatch: Userdata found in db (uid=%d)', $user->user_id, AgaviLogger::DEBUG);
 
+			if ($user->user_disabled == true) {
+			    $this->log('Auth.Dispatch: User %s is disabled, login denied!', $user->user_name, AgaviLogger::WARN);
+			    throw new AgaviSecurityException("Authentification failed,  $username is disabled!");
+			}
+			
 			$provider = $this->getProvider($user->user_authsrc);
 				
 			// We've got a provider





More information about the icinga-checkins mailing list