mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-19 03:35:12 +00:00
fix: domain discovery should be case insensitive (#6134)
Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
parent
ee26f99ebf
commit
78eae6f62b
@@ -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 {
|
func (repo *AuthRequestRepo) checkDomainDiscovery(ctx context.Context, request *domain.AuthRequest, loginName string) bool {
|
||||||
// check if there's a suffix in the loginname
|
// check if there's a suffix in the loginname
|
||||||
|
loginName = strings.TrimSpace(strings.ToLower(loginName))
|
||||||
index := strings.LastIndex(loginName, "@")
|
index := strings.LastIndex(loginName, "@")
|
||||||
if index < 0 {
|
if index < 0 {
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user