From f5916cca03809729147ca1df42dda7a032581ebb Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 25 Sep 2008 13:52:11 +0000 Subject: Fixed issue with pam handler, now if required method throws an exception the authentication short circuits with false. git-svn-id: https://code.elgg.org/elgg/trunk@2135 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/pam.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engine') diff --git a/engine/lib/pam.php b/engine/lib/pam.php index 4bc9b1cc2..35812f7d8 100644 --- a/engine/lib/pam.php +++ b/engine/lib/pam.php @@ -60,7 +60,7 @@ { $handler = $v->handler; $importance = $v->importance; - + try { // Execute the handler if ($handler($credentials)) @@ -73,18 +73,22 @@ else { $_PAM_HANDLERS_MSG[$k] = "Not Authenticated."; - + // If this is required then abort. if ($importance == 'required') return false; } } catch (Exception $e) - { + { $_PAM_HANDLERS_MSG[$k] = "$e"; + + // If this is required then abort. + if ($importance == 'required') + return false; } } - + return $authenticated; } -- cgit v1.2.3