aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-09-25 13:52:11 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-09-25 13:52:11 +0000
commitf5916cca03809729147ca1df42dda7a032581ebb (patch)
treeaa496c017c4559eb5a0aa9a50d306e6c19ca9c3a /engine/lib
parent291aefabaa693a45c1b7707ab683fb23af2fbb0d (diff)
downloadelgg-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/lib')
-rw-r--r--engine/lib/pam.php12
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;
}