From f550233d3cfa2d2b619942cf5147cd307098b9eb Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 9 Feb 2015 05:22:05 -0800 Subject: [PATCH] DynamicFKAuthorization - Security checks should not be case-sensitive. --- Civi/API/Subscriber/DynamicFKAuthorization.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/API/Subscriber/DynamicFKAuthorization.php b/Civi/API/Subscriber/DynamicFKAuthorization.php index 3b7b83b239..4f94fb4ac6 100644 --- a/Civi/API/Subscriber/DynamicFKAuthorization.php +++ b/Civi/API/Subscriber/DynamicFKAuthorization.php @@ -123,7 +123,7 @@ class DynamicFKAuthorization implements EventSubscriberInterface { */ public function onApiAuthorize(\Civi\API\Event\AuthorizeEvent $event) { $apiRequest = $event->getApiRequest(); - if ($apiRequest['version'] == 3 && $apiRequest['entity'] == $this->entityName && in_array(strtolower($apiRequest['action']), $this->actions)) { + if ($apiRequest['version'] == 3 && strtolower($apiRequest['entity']) == strtolower($this->entityName) && in_array(strtolower($apiRequest['action']), $this->actions)) { if (/*!$isTrusted */ empty($apiRequest['params']['id']) && empty($apiRequest['params']['entity_table']) ) { -- 2.25.1