Projet

Général

Profil

0003-validators-check-SMTP-RCPT-error-is-5xx-40989.patch

Benjamin Dauvergne, 25 mars 2020 10:46

Télécharger (952 octets)

Voir les différences:

Subject: [PATCH 3/4] validators: check SMTP RCPT error is 5xx (#40989)

 src/authentic2/validators.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/authentic2/validators.py
80 80
                        continue
81 81
                    smtp.mail('')
82 82
                    status = smtp.rcpt(value)
83
                    if status[0] % 100 == 5:
83
                    if status[0] // 100 == 5:
84 84
                        raise ValidationError(_('Invalid email address.'), code='rcpt-check-failed')
85 85
                    break
86 86
                except smtplib.SMTPServerDisconnected:
87
-