From da422b0669f2c184988985ea48c1995328ec8ed3 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Date: Thu, 13 Jan 2022 07:52:33 +0000 Subject: [PATCH] Bug 28786: (QA follow-up) Fix qa warnings Content-Type: text/plain; charset=utf-8 FAIL members/two_factor_auth.pl FAIL file permissions File must have the exec flag FAIL koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt FAIL filters missing_filter at line 42 ( <p>Account: [% issuer %]</p>) missing_filter at line 43 ( <p>Key: [% key_id %]</p>) missing_filter at line 54 ( <input type="hidden" name="secret32" value="[% secret32 %]" />) FAIL Koha/Auth/TwoFactorAuth.pm FAIL pod coverage POD is missing for 'new' Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Koha/Auth/TwoFactorAuth.pm | 6 ++++++ .../prog/en/modules/members/two_factor_auth.tt | 6 +++--- members/two_factor_auth.pl | 0 3 files changed, 9 insertions(+), 3 deletions(-) mode change 100644 => 100755 members/two_factor_auth.pl diff --git a/Koha/Auth/TwoFactorAuth.pm b/Koha/Auth/TwoFactorAuth.pm index f66379200d..8932006763 100644 --- a/Koha/Auth/TwoFactorAuth.pm +++ b/Koha/Auth/TwoFactorAuth.pm @@ -36,6 +36,12 @@ my $ok = $auth->verify($pin_code, 1, $secret32); It's based on Auth::GoogleAuth +=head2 METHODS + +=head3 new + + $obj = Koha::Auth::TwoFactorAuth->new({ patron => $p, secret => $s }); + =cut sub new { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt index d067c2dcde..a95210d622 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt @@ -39,8 +39,8 @@ <p>We recommend cloud-based mobile authenticator apps such as Authy, Duo Mobile, and LastPass. They can restore access if you lose your hardware device.</p> <p>Can't scan the code?</p> <p>To add the entry manually, provide the following details to the application on your phone.</p> - <p>Account: [% issuer %]</p> - <p>Key: [% key_id %]</p> + <p>Account: [% issuer | html %]</p> + <p>Key: [% key_id | html %]</p> <p>Time based: Yes</p> </div> @@ -51,7 +51,7 @@ <fieldset class="rows"> <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" /> <input type="hidden" name="op" value="register-2FA" /> - <input type="hidden" name="secret32" value="[% secret32 %]" /> + <input type="hidden" name="secret32" value="[% secret32 | html %]" /> <ol> <li> <label for="qr_code">QR code: </label> diff --git a/members/two_factor_auth.pl b/members/two_factor_auth.pl old mode 100644 new mode 100755 -- 2.20.1