Message341320
I found the issue located in https://github.com/python/cpython/blob/master/Lib/email/_parseaddr.py#L277
elif self.field[self.pos] in '.@':
# email address is just an addrspec
# this isn't very efficient since we start over
self.pos = oldpos
self.commentlist = oldcl
addrspec = self.getaddrspec()
returnlist = [(SPACE.join(self.commentlist), addrspec)]
The parseaddr function runs a for in loop over the input string, when it meets '.@' it will do something. That is why when the input string is 'foo@bar.com@example.com' will return ('', 'foo@bar.com'). One possible solution will be to check the string in the reverse order then we can always get the last '@' in the string. |
|
Date |
User |
Action |
Args |
2019-05-03 01:45:21 | Windson Yang | set | recipients:
+ Windson Yang, barry, vstinner, msapiro, ned.deily, r.david.murray, nicoe, kal.sze, xtreak, cnicodeme, bortzmeyer, jpic, Dain Dwarf |
2019-05-03 01:45:21 | Windson Yang | set | messageid: <1556847921.22.0.80106713067.issue34155@roundup.psfhosted.org> |
2019-05-03 01:45:21 | Windson Yang | link | issue34155 messages |
2019-05-03 01:45:21 | Windson Yang | create | |
|