From f7fed700651b6492162aa31b9be0a51188e1dc42 Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Wed, 3 Jul 2024 13:59:48 +0000 Subject: [PATCH] [23.05.x] 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 d25d9e58a57..e058bf95154 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.45.2