From 78eae6f62be5cfebc31075fe56b41d2e64da88ed Mon Sep 17 00:00:00 2001 From: Miguel Cabrerizo <30386061+doncicuto@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:02:16 +0200 Subject: [PATCH] fix: domain discovery should be case insensitive (#6134) Co-authored-by: Livio Spring --- .../auth/repository/eventsourcing/eventstore/auth_request.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/auth/repository/eventsourcing/eventstore/auth_request.go b/internal/auth/repository/eventsourcing/eventstore/auth_request.go index 4de5b0237..ba9845860 100644 --- a/internal/auth/repository/eventsourcing/eventstore/auth_request.go +++ b/internal/auth/repository/eventsourcing/eventstore/auth_request.go @@ -719,6 +719,7 @@ func (repo *AuthRequestRepo) checkLoginName(ctx context.Context, request *domain func (repo *AuthRequestRepo) checkDomainDiscovery(ctx context.Context, request *domain.AuthRequest, loginName string) bool { // check if there's a suffix in the loginname + loginName = strings.TrimSpace(strings.ToLower(loginName)) index := strings.LastIndex(loginName, "@") if index < 0 { return false