Bugzilla – Attachment 184613 Details for
Bug 40490
Warnings from GD::Barcode::QRcode on U24
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40490: Remove warnings from GD::Barcode::QRcode - U24
Bug-40490-Remove-warnings-from-GDBarcodeQRcode---U.patch (text/plain), 3.47 KB, created by
Marcel de Rooy
on 2025-07-25 07:07:59 UTC
(
hide
)
Description:
Bug 40490: Remove warnings from GD::Barcode::QRcode - U24
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-07-25 07:07:59 UTC
Size:
3.47 KB
patch
obsolete
>From c9dcefcfaca541481e1bca8bc258d13dc5b73629 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 24 Jul 2025 07:37:52 +0200 >Subject: [PATCH] Bug 40490: Remove warnings from GD::Barcode::QRcode - U24 >Content-Type: text/plain; charset=utf-8 > >01:18:38 koha_1 | # Failed test 'no warnings' >01:18:38 koha_1 | # at /usr/share/perl/5.38/Test/Builder.pm line 193. >01:18:38 koha_1 | # There were 6 warning(s) >01:18:38 koha_1 | # Previous test 4 '401 Unauthorized' >01:18:38 koha_1 | # Use of uninitialized value $aMask[1079] in bitwise xor (^) at /usr/share/perl5/GD/Barcode/QRcode.pm line 217. >01:18:38 koha_1 | # at /usr/share/perl5/GD/Barcode/QRcode.pm line 217. > >jammy (22.04LTS) (perl): 1.15-7 >noble (24.04LTS) (perl): 2.00-1 > >I guess it's fixed by >https://github.com/mbeijen/GD-Barcode/commit/85e7911e65bf1c4746d9ce2e743580bbf51da793 > >But it is not released yet: version 2 is from September 2023 and commit from March 2024. > >Test plan: >Install version 2 of GD::Barcode: > `cpanm GD::Barcode@2.0.0` >Run the tests >Without this patch the "no warnings" test fails >With this patch applied the tests pass > >Signed-off-by: David Cook <dcook@prosentient.com.au> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/api/v1/two_factor_auth.t | 28 +++++++++++++++++++++++-- > 1 file changed, 26 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/two_factor_auth.t b/t/db_dependent/api/v1/two_factor_auth.t >index ddb9178e3a..175e6e9529 100755 >--- a/t/db_dependent/api/v1/two_factor_auth.t >+++ b/t/db_dependent/api/v1/two_factor_auth.t >@@ -90,7 +90,19 @@ subtest 'registration and verification' => sub { > $tx = $t->ua->build_tx( POST => "/api/v1/auth/two-factor/registration" ); > $tx->req->cookies( { name => 'CGISESSID', value => $session->id } ); > $tx->req->env( { REMOTE_ADDR => $remote_address } ); >- $t->request_ok($tx)->status_is(201); >+ { >+ # Ignore the following warning >+ # Use of uninitialized value $aMask[1383] in bitwise xor (^) at /usr/local/share/perl/5.36.0/GD/Barcode/QRcode.pm line 217. >+ # We do not want to expect it (using Test::Warn): it is a bug from GD::Barcode >+ local $SIG{__WARN__} = sub { }; >+ my $dup_err; >+ local *STDERR; >+ open STDERR, ">>", \$dup_err; >+ >+ $t->request_ok($tx)->status_is(201); >+ >+ close STDERR; >+ } > my $secret32 = $t->tx->res->json->{secret32}; > > $tx = $t->ua->build_tx( POST => "/api/v1/auth/two-factor/registration/verification" ); >@@ -120,7 +132,19 @@ subtest 'registration and verification' => sub { > $tx = $t->ua->build_tx( POST => "/api/v1/auth/two-factor/registration" ); > $tx->req->cookies( { name => 'CGISESSID', value => $session->id } ); > $tx->req->env( { REMOTE_ADDR => $remote_address } ); >- $t->request_ok($tx)->status_is(201); >+ { >+ # Ignore the following warning >+ # Use of uninitialized value $aMask[1383] in bitwise xor (^) at /usr/local/share/perl/5.36.0/GD/Barcode/QRcode.pm line 217. >+ # We do not want to expect it (using Test::Warn): it is a bug from GD::Barcode >+ local $SIG{__WARN__} = sub { }; >+ my $dup_err; >+ local *STDERR; >+ open STDERR, ">>", \$dup_err; >+ >+ $t->request_ok($tx)->status_is(201); >+ >+ close STDERR; >+ } > $secret32 = $t->tx->res->json->{secret32}; > > $auth = Koha::Auth::TwoFactorAuth->new( { patron => $patron, secret32 => $secret32 } ); >-- >2.39.5
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 40490
:
184575
|
184576
| 184613