Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse an address with improperly quoted phrase #668

Open
raindrift opened this issue Feb 11, 2014 · 3 comments
Open

Unable to parse an address with improperly quoted phrase #668

raindrift opened this issue Feb 11, 2014 · 3 comments

Comments

@raindrift
Copy link
Contributor

When I attempt to parse an address that contains non-word characters in the phrase part, but where that part is unquoted, it fails with the following error:

 Mail::Field::ParseError:
   Mail::AddressListsParser can not parse |UCSD Electric Racing: Electronics <raceteam+electronics@127.0.0.1>|
   Reason was: Expected one of 
   , (, ,, ; at line 1, column 67 (byte 67) after Electric Racing: Electronics <raceteam+electronics@127.0.0.1>

I realize that an address in this format is not RFC-compliant. However, we see them in the wild regularly, and messages addressed as such seem to be delivered reliably. :(

@raindrift
Copy link
Contributor Author

For reference, the incorrect header here would have been something like:

 To: UCSD Electric Racing: Electronics <raceteam+electronics@127.0.0.1>

@carsonreinke
Copy link
Contributor

Related #685

@jeremy
Copy link
Collaborator

jeremy commented May 15, 2017

This works if the display name is quoted or the colon is removed. The colon is an invalid char in this context since it's used for group addresses.

There may be some way to work around this without causing parser regressions with legit addresses, but it's going to take some deeper digging!

(#685 appears to be unrelated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants