diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-25 13:52:11 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-25 13:52:11 +0000 |
commit | f5916cca03809729147ca1df42dda7a032581ebb (patch) | |
tree | aa496c017c4559eb5a0aa9a50d306e6c19ca9c3a /engine | |
parent | 291aefabaa693a45c1b7707ab683fb23af2fbb0d (diff) | |
download | elgg-f5916cca03809729147ca1df42dda7a032581ebb.tar.gz elgg-f5916cca03809729147ca1df42dda7a032581ebb.tar.bz2 |
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
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/pam.php | 12 |
1 files changed, 8 insertions, 4 deletions
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; } |