From e38f060c9507bebd71b40c57763a3ce5c27e4fbc Mon Sep 17 00:00:00 2001 From: sgayangi Date: Mon, 3 Feb 2025 12:59:39 +0530 Subject: [PATCH] Fix bug in scope validation --- gateway/enforcer/internal/authorization/scope_validation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gateway/enforcer/internal/authorization/scope_validation.go b/gateway/enforcer/internal/authorization/scope_validation.go index aae80c811..41846482e 100644 --- a/gateway/enforcer/internal/authorization/scope_validation.go +++ b/gateway/enforcer/internal/authorization/scope_validation.go @@ -40,8 +40,8 @@ func ValidateScopes(rch *requestconfig.Holder, subAppDataStore *datastore.Subscr } } found := false - for requiredScope := range requiredScopes { - for scope := range scopes { + for _, requiredScope := range requiredScopes { + for _, scope := range scopes { if requiredScope == scope { found = true break