Lines 624-638
sub execute_query {
Link Here
|
624 |
|
624 |
|
625 |
return ( $sth, { queryerr => $sth->errstr } ) if ( $sth->err ); |
625 |
return ( $sth, { queryerr => $sth->errstr } ) if ( $sth->err ); |
626 |
|
626 |
|
627 |
if ( $sql =~ m/password/ ) { |
627 |
# Check if table.* contained forbidden column names |
628 |
return ( $sth, { passworderr => "Illegal column in SQL" } ); |
628 |
return ( $sth, { passworderr => "Illegal column in results" } ) |
629 |
} |
629 |
if Koha::Report->new->check_columns( undef, $sth->{NAME_lc} ); |
630 |
|
|
|
631 |
foreach my $column ( @{ $sth->{NAME_lc} } ) { |
632 |
if ( $column eq 'password' ) { |
633 |
return ( $sth, { passworderr => "Illegal column in results" } ); |
634 |
} |
635 |
} |
636 |
|
630 |
|
637 |
return ($sth); |
631 |
return ($sth); |
638 |
} |
632 |
} |