From 2bd7d307b386af92f455526934ee2ca0069b174b 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 a4c27c1c1b7..0c1edcfc4d9 100644 --- a/Koha/REST/Plugin/Query.pm +++ b/Koha/REST/Plugin/Query.pm @@ -663,7 +663,8 @@ sub _rewrite_related_metadata_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.34.1