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

  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
@gopherbot
Copy link

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

@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
Development

No branches or pull requests

4 participants