Bugzilla – Attachment 170246 Details for
Bug 37508
SQL reports should not show patron password hash if queried
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37508: [23.11] (QA follow-up) Use ->check_columns
Bug-37508-2311-QA-follow-up-Use--checkcolumns.patch (text/plain), 1.65 KB, created by
Aleisha Amohia
on 2024-08-12 21:20:22 UTC
(
hide
)
Description:
Bug 37508: [23.11] (QA follow-up) Use ->check_columns
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-08-12 21:20:22 UTC
Size:
1.65 KB
patch
obsolete
>From 039534c89a23c1f4edc2127847d8ef9884c34387 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 9 Aug 2024 09:56:11 +0000 >Subject: [PATCH] Bug 37508: [23.11] (QA follow-up) Use ->check_columns > >Add shebang to Guided.t too. > >Test plan: >See also previous commits. >Try sql like: > select access_token from oauth_access_tokens > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Reports/Guided.pm | 12 +++--------- > t/db_dependent/Reports/Guided.t | 2 ++ > 2 files changed, 5 insertions(+), 9 deletions(-) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index fcad6bfbd84..f52c6babe44 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -615,15 +615,9 @@ sub execute_query { > }; > warn $@ if $@; > >- if ( $sql =~ m/password/ ) { >- return ( $sth, { passworderr => "Illegal column in SQL" } ); >- } >- >- foreach my $column ( @{ $sth->{NAME_lc} } ) { >- if ( $column eq 'password' ) { >- return ( $sth, { passworderr => "Illegal column in results" } ); >- } >- } >+ # Check if table.* contained forbidden column names >+ return ( $sth, { passworderr => "Illegal column in results" } ) >+ if Koha::Report->new->check_columns( undef, $sth->{NAME_lc} ); > > return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err); > return ( $sth ); >diff --git a/t/db_dependent/Reports/Guided.t b/t/db_dependent/Reports/Guided.t >index 18bd7763d22..e84ccc2e004 100755 >--- a/t/db_dependent/Reports/Guided.t >+++ b/t/db_dependent/Reports/Guided.t >@@ -1,3 +1,5 @@ >+#!/usr/bin/perl >+ > # Copyright 2012 Catalyst IT Ltd. > # Copyright 2015 Koha Development team > # >-- >2.39.2
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 37508
:
169806
|
169810
|
170121
|
170124
|
170125
|
170126
|
170127
|
170165
|
170171
|
170172
|
170173
|
170174
|
170175
|
170176
|
170229
|
170230
|
170241
|
170242
|
170243
|
170244
|
170245
| 170246 |
170247
|
170253