Project

General

Profile

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

Frédéric Péters (de retour le 27 mai), 19 April 2022 07:55 AM

Download (819 Bytes)

View differences:

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
-