Bug 37508: (QA follow-up) Use ->check_columns
Add shebang to Guided.t too. Test plan: See also previous commits. Try sql like: select access_token from oauth_access_tokens 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:
parent
c4ddaeb6aa
commit
4ad45ac37b
2 changed files with 5 additions and 9 deletions
|
@ -615,15 +615,9 @@ sub execute_query {
|
|||
};
|
||||
warn $@ if $@;
|
||||
|
||||
if ( $sql =~ m/password/ ) {
|
||||
return ( $sth, { passworderr => "Illegal column in SQL" } );
|
||||
}
|
||||
|
||||
foreach my $column ( @{ $sth->{NAME_lc} } ) {
|
||||
if ( $column eq 'password' ) {
|
||||
return ( $sth, { passworderr => "Illegal column in results" } );
|
||||
}
|
||||
}
|
||||
# Check if table.* contained forbidden column names
|
||||
return ( $sth, { passworderr => "Illegal column in results" } )
|
||||
if Koha::Report->new->check_columns( undef, $sth->{NAME_lc} );
|
||||
|
||||
return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err);
|
||||
return ( $sth );
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Copyright 2012 Catalyst IT Ltd.
|
||||
# Copyright 2015 Koha Development team
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue