From 7be9a037f78266a12d1f8397cc7da2e7ddcfbaa1 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 7 Aug 2024 04:37:25 +0000 Subject: [PATCH] Bug 37508: (follow-up) Throw error is password is in SQL query at all Confirm tests pass t/db_dependent/Reports/Guided.t Signed-off-by: David Cook --- C4/Reports/Guided.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index 8558666041..2bbccff3a3 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -624,6 +624,10 @@ sub execute_query { return ( $sth, { queryerr => $sth->errstr } ) if ( $sth->err ); + if ( $sql =~ m/password/ ) { + return ( $sth, { passworderr => $sql } ); + } + foreach my $column ( @{ $sth->{NAME_lc} } ) { if ( $column eq 'password' ) { return ( $sth, { passworderr => $column } ); -- 2.39.2