[server] convert email to lowerCase
This commit is contained in:
parent
d69ff79a67
commit
316473f5cf
1 changed files with 2 additions and 2 deletions
|
@ -194,8 +194,8 @@ func (repo *UserRepository) UpdateEmail(userID int64, encryptedEmail ente.Encryp
|
|||
|
||||
// GetUserIDWithEmail returns the userID associated with a provided email
|
||||
func (repo *UserRepository) GetUserIDWithEmail(email string) (int64, error) {
|
||||
trimmedEmail := strings.TrimSpace(email)
|
||||
emailHash, err := crypto.GetHash(trimmedEmail, repo.HashingKey)
|
||||
sanitizedEmail := strings.ToLower(strings.TrimSpace(email))
|
||||
emailHash, err := crypto.GetHash(sanitizedEmail, repo.HashingKey)
|
||||
if err != nil {
|
||||
return -1, stacktrace.Propagate(err, "")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue