GODT-1817: Do not allow authentication of disabled accounts

This commit is contained in:
Leander Beernaert
2023-01-09 13:59:11 +01:00
parent e1531c200c
commit 2562d1e77d

View File

@ -443,6 +443,10 @@ func (user *User) CheckAuth(email string, password []byte) (string, error) {
return safe.RLockRetErr(func() (string, error) {
for _, addr := range user.apiAddrs {
if addr.Status != proton.AddressStatusEnabled {
continue
}
if strings.EqualFold(addr.Email, email) {
return addr.ID, nil
}