Projet

Général

Profil

0002-misc-update-address-sanity-check-for-django-3.2-6429.patch

Frédéric Péters, 19 avril 2022 07:55

Télécharger (819 octets)

Voir les différences:

Subject: [PATCH 2/5] misc: update address sanity check for django 3.2 (#64295)

 wcs/qommon/emails.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
wcs/qommon/emails.py
144 144

  
145 145

  
146 146
def is_sane_address(email):
147
    if not email:
148
        return False
147 149
    try:
148 150
        sanitize_address(email, 'utf-8')
149
    except (IndexError, MessageError):
151
    except (IndexError, ValueError, MessageError):
150 152
        return False
151 153
    return True
152 154

  
153
-