Auth: Enable case insensitive logins/emails by default (#84840)

* wip

* wip

* wip

* wip postgres tests
This commit is contained in:
Eric Leijonmarck
2024-03-22 16:45:18 +01:00
committed by GitHub
parent d7fa99e2df
commit 2f7fd729ef
10 changed files with 294 additions and 252 deletions
+1 -5
View File
@@ -106,11 +106,7 @@ func (ss *xormStore) GetTempUsersQuery(ctx context.Context, query *tempuser.GetT
}
if query.Email != "" {
if ss.cfg.CaseInsensitiveLogin {
rawSQL += ` AND LOWER(tu.email)=LOWER(?)`
} else {
rawSQL += ` AND tu.email=?`
}
rawSQL += ` AND LOWER(tu.email)=LOWER(?)`
params = append(params, query.Email)
}