#36752: SMTP backend crashes on invalid email addresses such as “to@”
-------------------------------------+-------------------------------------
     Reporter:  Kwadwo Owusu Ansah   |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Core (Mail)          |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  smtp invalid email   |             Triage Stage:
  parser regression                  |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Jake Howard):

 Is it definitely not possible for an SMTP server to not require the
 hostname part of an address? I guess since Python's `email` library
 rejects it we probably don't have a choice.

 Regarding the patch, it seems to only change the exception, rather than
 notably change behaviour. Perhaps it's better to wrap the
 `AddressHeader.value_parser` call in a `try: except:` and raise a slightly
 nicer message. I assume hitting a `ValueError` will just raise a different
 exception, rather than notably changing the crashing behaviour?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36752#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019abb7b017b-b1b60818-14ec-4fe1-a4a2-6f8ade232083-000000%40eu-central-1.amazonses.com.

Reply via email to