summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2011-11-18 11:15:05 +0100
committerGervase Markham <gerv@mozilla.org>2011-11-18 11:15:05 +0100
commitbf1b11403e315a95d27dd12da297ceebbf9f3a4e (patch)
treec31a91ccd982240202fa185e80153611a414d8d2 /Bugzilla
parent078a9fc2858e7f295ada4cd5bc9ac666154886aa (diff)
downloadbugzilla-bf1b11403e315a95d27dd12da297ceebbf9f3a4e.tar.gz
bugzilla-bf1b11403e315a95d27dd12da297ceebbf9f3a4e.tar.xz
Make Login/Stack.pm refuse to continue down the stack if an Auth method returns an explicit failure. r=dkl, a=mkanat.
https://bugzilla.mozilla.org/show_bug.cgi?id=698423
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Auth/Login/Stack.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Bugzilla/Auth/Login/Stack.pm b/Bugzilla/Auth/Login/Stack.pm
index 0f3661954..e8d9c4635 100644
--- a/Bugzilla/Auth/Login/Stack.pm
+++ b/Bugzilla/Auth/Login/Stack.pm
@@ -28,6 +28,7 @@ use fields qw(
);
use Hash::Util qw(lock_keys);
use Bugzilla::Hook;
+use Bugzilla::Constants;
use List::MoreUtils qw(any);
sub new {
@@ -60,8 +61,13 @@ sub get_login_info {
}
$result = $object->get_login_info(@_);
$self->{successful} = $object;
- last if !$result->{failure};
- # So that if none of them succeed, it's undef.
+
+ # We only carry on down the stack if this method denied all knowledge.
+ last unless ($result->{failure}
+ && ($result->{failure} eq AUTH_NODATA
+ || $result->{failure} eq AUTH_NO_SUCH_USER));
+
+ # If none of the methods succeed, it's undef.
$self->{successful} = undef;
}
return $result;