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: ParseAddress doesn't error on multiple addresses #14610

Closed
rolandshoemaker opened this issue Mar 3, 2016 · 1 comment
Closed

net/mail: ParseAddress doesn't error on multiple addresses #14610

rolandshoemaker opened this issue Mar 3, 2016 · 1 comment

Comments

@rolandshoemaker
Copy link
Member

@rolandshoemaker rolandshoemaker commented Mar 3, 2016

  1. What version of Go are you using (go version)?
    go 1.6
  2. What operating system and processor architecture are you using (go env)?
    Ubuntu 16.04 amd64
  3. What did you do?
package main

import "fmt"
import "net/mail"

func main() {
    a, err := mail.ParseAddress("a@gmail.com b@gmail.com")
    fmt.Printf("%#v %v\n", a, err)
}
  1. What did you expect to see?
    An error thrown
  2. What did you see instead?
    An Address is returned for a@gmail.com and no error is thrown. It seems like the internal address parser should check for trailing garbage after an address and fail on that case (since we aren't calling ParseAddressList).
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Mar 3, 2016
@bradfitz bradfitz added the help wanted label Mar 3, 2016
@gopherbot
Copy link

@gopherbot gopherbot commented Mar 3, 2016

CL https://golang.org/cl/20180 mentions this issue.

@gopherbot gopherbot closed this in e7538df Mar 31, 2016
@golang golang locked and limited conversation to collaborators Mar 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.