mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
GODT-1817: Do not allow authentication of disabled accounts
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user