Skip to content
Snippets Groups Projects
Commit 9a5bdb72 authored by Jared Hancock's avatar Jared Hancock
Browse files

Careful transcoding attachments with a charset

If a non-text attachment specifies a charset in the content-type header,
don't transcode the content before saving it to the database. This can
corrupt attachments which have a header like the following:

Content-Type: application/pdf; charset=UTF-8

Since a PDF contains binary data, coercing it to UTF-8 encoding will drop
characters not valid in UTF-8 and will corrupt the attachment data.
parent bfc2b7c4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment