From 50b8f5ddb58f18fbd4d599b0b8f2ec24ecde31b6 Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Wed, 3 Jul 2024 13:59:48 +0000 Subject: [PATCH] Bug 37018: (follow-up) adding some allowed operators Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- Koha/REST/Plugin/Query.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/REST/Plugin/Query.pm b/Koha/REST/Plugin/Query.pm index 9fe17156e2..ddbb75e342 100644 --- a/Koha/REST/Plugin/Query.pm +++ b/Koha/REST/Plugin/Query.pm @@ -511,7 +511,8 @@ sub _parse_dbic_query { sub _validate_operator { my ($operator) = @_; - my %allowed_operators = map { $_ => 1 } qw(= != < > <= >= like -not_like -in -ident -bool -not_bool -or); + my %allowed_operators = + map { $_ => 1 } qw(= != < > <= >= like -not_like -in -ident -bool -not_bool -or -like -not -and -regexp); Koha::Exceptions::REST::Query::InvalidOperator->throw( operator => $operator ) unless exists $allowed_operators{$operator}; return; -- 2.39.5