summaryrefslogtreecommitdiffstats
path: root/Bugzilla/MFA
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-09-29 16:57:02 +0200
committerByron Jones <glob@mozilla.com>2015-09-29 16:57:02 +0200
commit05fed61671067cb6a750d41909ccb5692ba43808 (patch)
tree3ed5654e9383df29b48c009f16aed40d26782b1d /Bugzilla/MFA
parent87c32cbdf12784dacbbcd9694753ac0e5e02afea (diff)
downloadbugzilla-05fed61671067cb6a750d41909ccb5692ba43808.tar.gz
bugzilla-05fed61671067cb6a750d41909ccb5692ba43808.tar.xz
Bug 1199090 - add printable recovery 2fa codes
Diffstat (limited to 'Bugzilla/MFA')
-rw-r--r--Bugzilla/MFA/TOTP.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/MFA/TOTP.pm b/Bugzilla/MFA/TOTP.pm
index 859ca4b8d..64efcfc8d 100644
--- a/Bugzilla/MFA/TOTP.pm
+++ b/Bugzilla/MFA/TOTP.pm
@@ -58,10 +58,10 @@ sub prompt {
sub check {
my ($self, $params) = @_;
- my $code = $params->{code} // '';
+ my $code = $params->{code};
return if $self->_auth()->verify($code, 1);
- if (exists $params->{mfa_action}) {
+ if ($params->{mfa_action} && $params->{mfa_action} eq 'enable') {
ThrowUserError('mfa_totp_bad_enrolment_code');
}
else {