From b68eca184d8172cacc659f1011927ca17a519d18 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Tue, 14 Apr 2020 10:41:26 -0700 Subject: [PATCH] LP#1777677: restrict allowable hooks for test notifications The open-ils.actor.event.test_notification API call should only support the au.email.test and au.sms_text.test hooks. Signed-off-by: Jeff Davis Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm index 3b39d398f3..5d85c7994c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm @@ -4368,8 +4368,9 @@ sub fire_test_notification { } my $event_hook = $$args{hook} or return $e->event; - my $usr = $e->retrieve_actor_user($$args{target}); + return $e->event unless ($event_hook eq 'au.email.test' or $event_hook eq 'au.sms_text.test'); + my $usr = $e->retrieve_actor_user($$args{target}); return $e->event unless $usr; return $U->fire_object_event(undef, $event_hook, $usr, $e->requestor->ws_ou); -- 2.11.0