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 <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Aleisha Amohia 2024-08-07 04:37:25 +00:00 committed by Katrin Fischer
parent 8e05b3933b
commit 2d1f58242b
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -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 } );