go-imap
go-imap copied to clipboard
Flags are converted to RawString without any check
If the user calls Client.Append with flags containing invalid chars (e.g. a space), go-imap will send garbage to the server. We should check such user-provided strings.
Maybe we can introduce a function like func FormatRawString(s string) (RawString, error).
Note that the keyword flags are a special case, which may require a different validation than quoted strings.
Fixed in v2.