From 175fef21bf58165198fcde217194b425f88bc266 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 --- Koha/REST/Plugin/Query.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/REST/Plugin/Query.pm b/Koha/REST/Plugin/Query.pm index a4160ac7d2e..1c3df20cc36 100644 --- a/Koha/REST/Plugin/Query.pm +++ b/Koha/REST/Plugin/Query.pm @@ -672,7 +672,7 @@ 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::BadParameter->throw( "Invalid operator in query: $operator") unless exists $allowed_operators{$operator}; return; -- 2.45.2