From 2bd1c6651c2aadd1ad387d7ff65d1c67984cc22b 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 f95243befc..bcd36df689 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