You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of these is =?utf-8?B?4oCcU25vd+KAnSBieSBEYWxlIEJhaWxleS5wZGY=?=, which is base64-encoded UTF-8. The other is =?utf-8?Q?=E2=80=9CThe_Letters_They_Left_Behind=E2=80=9D_--_Scott_Edelman?==?utf-8?Q?=2Epdf?=, which is quoted-printable UTF-8.
according to the rfc's (2231, and 2047), non-ascii filenames in content-type
and content-disposition headers should be encoded like this:
Content-Type: text/plain; name*=utf-8''hi%E2%98%BA.txt
Content-Disposition: attachment; filename*=utf-8''hi%E2%98%BA.txt
and that is what the Go standard library mime.ParseMediaType and
mime.FormatMediaType parse and generate.
this is what thunderbird sends:
Content-Type: text/plain; charset=UTF-8; name="=?UTF-8?B?aGnimLoudHh0?="
Content-Disposition: attachment; filename*=UTF-8''%68%69%E2%98%BA%2E%74%78%74
(thunderbird will also correctly split long filenames over multiple parameters,
named "filename*0*", "filename*1*", etc.)
this is what gmail sends:
Content-Type: text/plain; charset="US-ASCII"; name="=?UTF-8?B?aGnimLoudHh0?="
Content-Disposition: attachment; filename="=?UTF-8?B?aGnimLoudHh0?="
i cannot find where the q/b-word encoded values in "name" and "filename" are
allowed. until that time, we try parsing them unless in pedantic mode.
we didn't generate correctly encoded filenames yet, this commit also fixes that.
for issue #82 by mattfbacon, thanks for reporting!
I see this in the mox webmail:
One of these is
=?utf-8?B?4oCcU25vd+KAnSBieSBEYWxlIEJhaWxleS5wZGY=?=
, which is base64-encoded UTF-8. The other is=?utf-8?Q?=E2=80=9CThe_Letters_They_Left_Behind=E2=80=9D_--_Scott_Edelman?==?utf-8?Q?=2Epdf?=
, which is quoted-printable UTF-8.The relevant sections of the raw email are:
The text was updated successfully, but these errors were encountered: