From ce4b4430247a505e04b1fabad3079294de8b8264 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 Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- C4/Reports/Guided.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index 986680783c..e75f8bbceb 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -615,6 +615,10 @@ sub execute_query { }; warn $@ if $@; + if ( $sql =~ m/password/ ) { + return ( $sth, { passworderr => $sql } ); + } + foreach my $column ( @{ $sth->{NAME_lc} } ) { if ( $column eq 'password' ) { return ( $sth, { passworderr => $column } ); -- 2.39.5