Skip to content

net/textproto: ReadMIMEHeader returns invalid UTF8 in its error message #12715

Description

@signalsensefred

If ReadMIMEHeader returns an error because the MIME header is invalid, the string in that error contains the original MIME header, which can end up being invalid Unicode. The error string should be escaped, perhaps by formatting the MIME header as a list of byte values if utf8.ValidString returns false on it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions