Closed
Description
The following program fails with the panic:
package main
import (
"fmt"
"net/mail"
)
func main() {
data := "=??Q? ?=<0@0>"
addr, err := mail.ParseAddress(data)
if err != nil {
return
}
_, err = mail.ParseAddress(addr.String())
if err != nil {
fmt.Printf("failed to parse addr: %q -> %q\n", data, addr)
panic(err)
}
}
failed to parse addr: "=??Q? ?=<0@0>" -> "\"=??Q? ?=\" <0@0>"
panic: mail: missing word in phrase: charset not supported: ""
That name should have been escaped.
go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64
Activity