jpic <[email protected]> added the comment:
Thanks for your explanation, but in perspective with other invalid
domains, such as "foo." currently resulting in an empty string too:
>>> email.message_from_string('From:
>>> a@foo.',policy=email.policy.default)['from'].addresses[0].domain
''
Do you think this should also change the value of domain to "foo." ?
Also yes with parseaddr it seems that domain is an empty string if it
didn't find a valid domain at all, which is pretty safe in case of
malicious injection attempt - if that's what we're trying to save
python programs from, a clarification of the objective of the patch
would be welcome.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34155>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com