|
Lines 615-629
sub execute_query {
Link Here
|
| 615 |
}; |
615 |
}; |
| 616 |
warn $@ if $@; |
616 |
warn $@ if $@; |
| 617 |
|
617 |
|
| 618 |
if ( $sql =~ m/password/ ) { |
618 |
# Check if table.* contained forbidden column names |
| 619 |
return ( $sth, { passworderr => "Illegal column in SQL" } ); |
619 |
return ( $sth, { passworderr => "Illegal column in results" } ) |
| 620 |
} |
620 |
if Koha::Report->new->check_columns( undef, $sth->{NAME_lc} ); |
| 621 |
|
|
|
| 622 |
foreach my $column ( @{ $sth->{NAME_lc} } ) { |
| 623 |
if ( $column eq 'password' ) { |
| 624 |
return ( $sth, { passworderr => "Illegal column in results" } ); |
| 625 |
} |
| 626 |
} |
| 627 |
|
621 |
|
| 628 |
return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err); |
622 |
return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err); |
| 629 |
return ( $sth ); |
623 |
return ( $sth ); |