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

net/mail: mail.ParseAddress() doesn't handle parantheses #7831

Closed
gopherbot opened this issue Apr 22, 2014 · 3 comments
Closed

net/mail: mail.ParseAddress() doesn't handle parantheses #7831

gopherbot opened this issue Apr 22, 2014 · 3 comments

Comments

@gopherbot
Copy link

by Artagnon:

The following program errors out:

  addr, err := mail.ParseAddress("=?utf-8?q?btrahan_(Bob_Trahan)?= <noreply@phabricator.com>")
  if err != nil {
    fmt.Println(err)
  }

with:

  mail: no angle-addr

Although the given address is valid.
@bradfitz
Copy link
Contributor

Comment 1:

Labels changed: added release-go1.3maybe, repo-main.

Owner changed to @dsymonds.

@dsymonds
Copy link
Contributor

Comment 2:

That address is not valid according to RFC 5322. Those parens should have been escaped.
You could make the case that net/mail should still parse it, but you'd need to back that
up with some idea of how common that spec violation is.

Labels changed: added release-none, removed release-go1.3maybe.

Status changed to WorkingAsIntended.

@gopherbot
Copy link
Author

Comment 3 by anthony@indb.uk:

how should we handle this kind of email ? Obviously there are a lot of such broken
emails (i.e. from 1400 emails I've found 20 into my inbox )

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants