Bugzilla – Attachment 169806 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: Throw error if password column is detected in SQL report
Bug-37508-Throw-error-if-password-column-is-detect.patch (text/plain), 2.17 KB, created by
Aleisha Amohia
on 2024-07-29 03:55:15 UTC
(
hide
)
Description:
Bug 37508: Throw error if password column is detected in SQL report
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-07-29 03:55:15 UTC
Size:
2.17 KB
patch
obsolete
>From b92489038193bf17169070ed1ca0f33c8239d0ae Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 29 Jul 2024 03:53:06 +0000 >Subject: [PATCH] Bug 37508: Throw error if password column is detected in SQL > report > >TESTS TO COME >--- > C4/Reports/Guided.pm | 6 ++++++ > .../prog/en/modules/reports/guided_reports_start.tt | 4 ++++ > 2 files changed, 10 insertions(+) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index f69804c2838..586c979b343 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -622,6 +622,12 @@ sub execute_query { > Koha::Logger->get( { prefix => 0, interface => 'reports', category => 'execute.time.end' } ) > ->info("Report finished: $report_id") if $report_id; > >+ foreach my $header ( @{ $sth->{NAME} } ) { >+ if ( $header eq 'password' ) { >+ return ( $sth, { passworderr => $header } ); >+ } >+ } >+ > return ( $sth, { queryerr => $sth->errstr } ) if ( $sth->err ); > return ($sth); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index b039bd5cf95..44c9cf766b8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1436,6 +1436,10 @@ > [% error.queryerr | html %]<br />Please check the log for further details. > [% ELSIF ( error.cache_expiry ) %] > Please select a cache expiry less than 30 days. >+ [% ELSIF ( error.passworderr ) %] >+ The column selection in this report includes a password field.<br> >+ The report cannot be executed due to security risks.<br> >+ Please edit this report and ensure no password columns have been selected. > [% ELSE %] > [% END %] > <div id="onerror_actions"> >-- >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