add printable recovery 2fa codes

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
General
P2
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

(Blocks: 1 bug)

Production
Dependency tree / graph

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 years ago
add printable recovery 2fa codes
(Assignee)

Updated

2 years ago
Priority: -- → P2
(Assignee)

Updated

2 years ago
Depends on: 1199087
(Assignee)

Comment 1

2 years ago
Created attachment 8664662 [details] [diff] [review]
1199090_1.patch

- add ability to generate codes
- allows codes to be used anywhere 2fa is required
- minor fixes (uninit warnings, printing tweaks)
Attachment #8664662 - Flags: review?(dylan)
Comment on attachment 8664662 [details] [diff] [review]
1199090_1.patch

Review of attachment 8664662 [details] [diff] [review]:
-----------------------------------------------------------------

r- because inconsistent calling convention of verify_check() -- in one place it is called with no arguments,
and in another with arguments. The behavior seems fine but I'd like that to be fixed before I finish reviewing it.

::: Bugzilla/MFA.pm
@@ +90,5 @@
> +}
> +
> +# methods
> +
> +sub generate_recovery_codes {

nit 1: I don't think we really need three loops here. 
nit 2: the first loop doesn't conform to our usual coding conventions.

::: userprefs.cgi
@@ +675,5 @@
>          clear_settings_cache(Bugzilla->user->id);
>      }
> +
> +    elsif ($action eq 'recovery') {
> +        $user->mfa_provider->verify_check(Bugzilla->input_params);

Argument passed to method is not used.

@@ +686,2 @@
>      else {
> +        $user->mfa_provider->verify_check(Bugzilla->input_params);

Argument passed to method is not used by method.
Attachment #8664662 - Flags: review?(dylan) → review-
(Assignee)

Comment 3

2 years ago
Created attachment 8665259 [details] [diff] [review]
1199090_2.patch

- actually use the passed param
- simplify code generation
Attachment #8664662 - Attachment is obsolete: true
Attachment #8665259 - Flags: review?(dylan)
Comment on attachment 8665259 [details] [diff] [review]
1199090_2.patch

Review of attachment 8665259 [details] [diff] [review]:
-----------------------------------------------------------------

r=dylan
Attachment #8665259 - Flags: review?(dylan) → review+
(Assignee)

Comment 5

2 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   87c32cb..05fed61  master -> master
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.