From a10697ff76b484b6d77913295ed3499eda50b551 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 Signed-off-by: Katrin Fischer --- 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 a4c27c1c1b..0c1edcfc4d 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.39.5