CyberShadow / DFeed

D news aggregator, newsgroup client, web newsreader and IRC bot
http://forum.dlang.org/help#about
381 stars 35 forks source link

If Name starts with "<" then the mail address is partially displayed #106

Open ghost opened 6 years ago

ghost commented 6 years ago

Here https://forum.dlang.org/post/zypissnywmxvekuucuya@forum.dlang.org. The user name used was <Lesser_name and the user address used was address@somewhere.org But something strange is displayed instead of <Lesser_name there's Lesser_name <address

CyberShadow commented 6 years ago
From: <lesser_name <address@somewhere.org>

That doesn't look valid. The server shouldn't have accepted it.

CyberShadow commented 6 years ago

https://tools.ietf.org/tools/msglint/ says:

ERROR: at least one mailbox required at or before token '<' in header 'From' 
       at line 2
ERROR: unexpected tokens at end of header 'From' at line 2
ERROR:  Token type       special: <
ERROR:  Token type          atom: address
ERROR:  Token type       special: @
ERROR:  Token type          atom: somewhere
ERROR:  Token type       special: .
ERROR:  Token type          atom: org
ERROR:  Token type       special: >
CyberShadow commented 6 years ago

We can fix DFeed from emitting such messages, but we can't fix others sending such malformed messages via email/NNTP..

CyberShadow commented 6 years ago

DFeed's header parsing is really ad-hoc and needs a rewrite. I'll have to get back to this later, probably port the test messages from my Windows installation's hard drive to real unit tests first.