forked from Silverfish/proton-bridge
fix(GODT-2913): Reduce the number of configuration failure detected.
This commit is contained in:
@ -249,7 +249,7 @@ func (s *Service) run(ctx context.Context) {
|
||||
r.Reply(ctx, maps.Clone(s.identity.Addresses), nil)
|
||||
|
||||
case *checkAuthReq:
|
||||
id, err := s.identity.CheckAuth(req.email, req.password, s.bridgePassProvider, s.telemetry)
|
||||
id, err := s.identity.CheckAuth(req.email, req.password, s.bridgePassProvider)
|
||||
r.Reply(ctx, id, err)
|
||||
|
||||
default:
|
||||
|
||||
@ -226,7 +226,7 @@ func (s *State) Clone() *State {
|
||||
|
||||
// CheckAuth returns whether the given email and password can be used to authenticate over IMAP or SMTP with this user.
|
||||
// It returns the address ID of the authenticated address.
|
||||
func (s *State) CheckAuth(email string, password []byte, bridgePassProvider BridgePassProvider, telemetry Telemetry) (string, error) {
|
||||
func (s *State) CheckAuth(email string, password []byte, bridgePassProvider BridgePassProvider) (string, error) {
|
||||
if email == "crash@bandicoot" {
|
||||
panic("your wish is my command.. I crash")
|
||||
}
|
||||
@ -237,11 +237,7 @@ func (s *State) CheckAuth(email string, password []byte, bridgePassProvider Brid
|
||||
}
|
||||
|
||||
if subtle.ConstantTimeCompare(bridgePassProvider.BridgePass(), dec) != 1 {
|
||||
err := fmt.Errorf("invalid password")
|
||||
if telemetry != nil {
|
||||
telemetry.ReportConfigStatusFailure(err.Error())
|
||||
}
|
||||
return "", err
|
||||
return "", fmt.Errorf("invalid password")
|
||||
}
|
||||
|
||||
for _, addr := range s.AddressesSorted {
|
||||
|
||||
Reference in New Issue
Block a user