Bugzilla – Attachment 152037 Details for
Bug 33880
"Enable two-factor authentication" fails if patron's library branchname is too long
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33880: Remove Version param from GB::Barcode->new
Bug-33880-Remove-Version-param-from-GBBarcode-new.patch (text/plain), 1.59 KB, created by
Jonathan Druart
on 2023-06-06 08:03:34 UTC
(
hide
)
Description:
Bug 33880: Remove Version param from GB::Barcode->new
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-06-06 08:03:34 UTC
Size:
1.59 KB
patch
obsolete
>From 4c7aa19b31dc980e001831a4862a57f1bf52a5c5 Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@ptfs-europe.com> >Date: Fri, 2 Jun 2023 13:13:47 +0000 >Subject: [PATCH] Bug 33880: Remove Version param from GB::Barcode->new > >Looking at the code here > if (Koha/Auth/TwoFactorAuth.pmoSelf->{Version}){ #--- auto version select > for(->{Version}=1; ->{Version} <= 40; ++->{Version}) { > last if ({->{Ecc}}->[->{Version}] > >= + ->[->{Version}]); > } > } > >in https://metacpan.org/release/KWITKNR/GD-Barcode-1.15/source/Barcode/QRcode.pm#L349 > >It appears the version parameter is not required, and will default to whatever version has the necessary bits for the input words given > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Auth/TwoFactorAuth.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Auth/TwoFactorAuth.pm b/Koha/Auth/TwoFactorAuth.pm >index 5cd6d13ac7d..238d01f8dc9 100644 >--- a/Koha/Auth/TwoFactorAuth.pm >+++ b/Koha/Auth/TwoFactorAuth.pm >@@ -101,7 +101,7 @@ sub qr_code { > > my $otpauth = $self->SUPER::qr_code( undef, undef, undef, 1); > # no need to pass secret, key and issuer again >- my $qrcode = GD::Barcode->new( 'QRcode', $otpauth, { Ecc => 'M', Version => 10, ModuleSize => 4 } ); >+ my $qrcode = GD::Barcode->new( 'QRcode', $otpauth, { Ecc => 'M', ModuleSize => 4 } ); > my $data = $qrcode->plot->png; > return "data:image/png;base64,". encode_base64( $data, q{} ); # does not contain newlines > } >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33880
:
151981
|
152037
|
152194