Other: Match any case in IMAP/SMTP auth, with test

This commit is contained in:
James Houlahan
2022-10-13 11:02:43 +02:00
parent 23d3e54ddb
commit 7fe2c094a9
4 changed files with 17 additions and 2 deletions

View File

@ -375,7 +375,7 @@ func (user *User) checkAuth(email string, password []byte) (string, error) {
return safe.MapValuesRetErr(user.apiAddrs, func(apiAddrs []liteapi.Address) (string, error) {
for _, addr := range apiAddrs {
if addr.Email == strings.ToLower(email) {
if strings.EqualFold(addr.Email, strings.ToLower(email)) {
return addr.ID, nil
}
}