From e87a06b96bf5e992467b21dc7e4eb112b731599a Mon Sep 17 00:00:00 2001 From: Evan Sims Date: Tue, 18 Jul 2023 12:18:52 -0500 Subject: [PATCH] Address feedback by @stevehobbsdev --- src/Token/Validator.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Token/Validator.php b/src/Token/Validator.php index 7909659e..9dd854a6 100644 --- a/src/Token/Validator.php +++ b/src/Token/Validator.php @@ -241,12 +241,10 @@ public function organization( } if (null !== $organizationName) { - // Normalize the org_name claim to lowercase for case insensitive comparisons. - $lowercaseOrganizationName = strtolower($organizationName); $allowedOrganizationNames = array_map('strtolower', array_filter($allowedOrganizations, static fn ($org): bool => ! str_starts_with($org, 'org_'))); // org_name claim is present and in the allowlist. Success. - if (in_array($lowercaseOrganizationName, $allowedOrganizationNames, true)) { + if (in_array($organizationName, $allowedOrganizationNames, true)) { return $this; } }