GODT-949: Add comment about ignoring InvalidMediaParameter

This commit is contained in:
James Houlahan
2021-06-01 09:04:05 +00:00
parent dec00ff9cc
commit ec5b5939b9

View File

@ -66,6 +66,7 @@ func writeEncryptedPart(kr *crypto.KeyRing, header *textproto.Header, r io.Reade
encoded := new(bytes.Buffer)
contentType, contentParams, err := parseContentType(header.Get("Content-Type"))
// Ignoring invalid media parameter makes it work for invalid tutanota RFC2047-encoded attachment filenames since we often only really need the content type and not the optional media parameters.
if err != nil && !errors.Is(err, mime.ErrInvalidMediaParameter) {
return nil, err
}