Lines 218-224
get '/dbic_validate_operators' => sub {
Link Here
|
218 |
} |
218 |
} |
219 |
catch { |
219 |
catch { |
220 |
$c->render( |
220 |
$c->render( |
221 |
status => 400, |
221 |
status => 500, |
222 |
json => { error => "$_" } |
222 |
json => { error => "$_" } |
223 |
); |
223 |
); |
224 |
}; |
224 |
}; |
Lines 689-695
subtest 'dbic_validate_operators' => sub {
Link Here
|
689 |
# Invalid queries |
689 |
# Invalid queries |
690 |
$q = [ { "-and" => [ [ { "biblio_id" => { "like(sleep(1/100000))or" => "%a%" } } ] ] } ]; |
690 |
$q = [ { "-and" => [ [ { "biblio_id" => { "like(sleep(1/100000))or" => "%a%" } } ] ] } ]; |
691 |
$t->get_ok( '/dbic_validate_operators' => json => { q => $q } ) |
691 |
$t->get_ok( '/dbic_validate_operators' => json => { q => $q } ) |
692 |
->status_is(400) |
692 |
->status_is(500) |
693 |
->json_is( '/error' => |
693 |
->json_is( '/error' => |
694 |
qq{Exception 'Koha::Exceptions::BadParameter' thrown 'Invalid operator in query: like(sleep(1/100000))or'\n} |
694 |
qq{Exception 'Koha::Exceptions::BadParameter' thrown 'Invalid operator in query: like(sleep(1/100000))or'\n} |
695 |
); |
695 |
); |
696 |
- |
|
|