[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-12-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the explanations and fix! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9286 ___

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-12-18 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Committed in r87384. Barry, I've added you as nosy in case you disagree with this fix. The essential point is that before, parseaddr would turn 'merwok w...@example.com' into 'merwok...@example.com', and now it preserves the

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-12-18 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: On Dec 18, 2010, at 06:31 PM, R. David Murray wrote: Barry, I've added you as nosy in case you disagree with this fix. The essential point is that before, parseaddr would turn 'merwok w...@example.com' into 'merwok...@example.com', and now it

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-12-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I have not read email RFCs, so I will defer to you. One suggestion for the patch, though: Use example.org instead of rusty.com (see RFC 2606). I tried the examples in Icedove (free Thunderbird), either it finds a matching contact or it refuses

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-12-15 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't see any reason to use example.com in tests that are not talking to the network and aren't documentation. The interesting question about the other mailers is, if you *receive* an email with such an address (1) what does it show

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-12-15 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: On the other hand, putting a real domain name that belongs to somebody else into our code base even as a test string is probably impolite without asking, so I'll change it when I commit. --

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-12-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Yes, it’s either impolite or free advertisement. Ideas to receive such a malformed email: Use a valid email in From but not in Reply-To; write it by hand and put it in your maildir. -- ___ Python

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-12-12 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: OK, I've studied this more, and it looks to me like the legacy address format allows multiple atoms separated by white space in the local part of the address. This means that the correct parse would be ('', 'merwok w...@rusty.com')

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-11-11 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Having no time to read email RFCs, I’ll defer to you here. Please reject this report or save it for later as you prefer. -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-11-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: In connection with another bug report I found a rather basic error in parseaddr, so I'm going to eventually dig far enough into the RFC to have a real opinion on the elided-space issue. --

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-10-01 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: In the first of your examples, parseaddr is correct (a lone token is considered a 'local' address per RFC). The second one is prossibly wrong, but if so the correct way to interpret it is not clear. If you read the RFC carefully

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-07-17 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: This behavior does not seem right to me: parsing 'merwok' expected ('merwok', '') got ('', 'merwok') parsing 'merwok w...@rusty' expected ('', 'w...@rusty') got ('', 'merwok...@rusty') (Generated with a small script just doing a

[issue9286] email.utils.parseaddr returns garbage for invalid input

2010-07-17 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: - r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9286 ___ ___