go-imap icon indicating copy to clipboard operation
go-imap copied to clipboard

Flags are converted to RawString without any check

Open emersion opened this issue 4 years ago • 1 comments

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).

emersion avatar Dec 18 '19 15:12 emersion

Note that the keyword flags are a special case, which may require a different validation than quoted strings.

Adirelle avatar Dec 19 '19 11:12 Adirelle

Fixed in v2.

emersion avatar Mar 17 '23 23:03 emersion