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>
This commit is contained in:
Aleisha Amohia 2024-08-07 04:37:25 +00:00 committed by Tomas Cohen Arazi
parent 91f7f79fe1
commit fe2be0330c
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 4 additions and 0 deletions

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