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
This header cannot be parsed using the Mail::ContentTypeElement because the encoded attachment name is not quoted. Inside Mail::ContentTypeField, there is a sanitize method which tries to work around these broken e-mails by performing actions, such as adding these quotes. However, this function also calls downcase! on the value:
Fixesmikel#1398
This change removes the sequence of code that downcases the Content-Type header value.
If I should believe the specs, it should serve no purpose. Only 2 specs break because
of the charset being returned in capital letters instead of downcased as before.
This fixes the problem is which encoding is broken by downcasing, such as the example
with base64 provided in mikel#1398
I have an e-mail with PDF attachment, with the following
Content-Type
header:This header cannot be parsed using the
Mail::ContentTypeElement
because the encoded attachment name is not quoted. InsideMail::ContentTypeField
, there is asanitize
method which tries to work around these broken e-mails by performing actions, such as adding these quotes. However, this function also callsdowncase!
on the value:mail/lib/mail/fields/content_type_field.rb
Lines 126 to 130 in 8fbb17d
This results in the final header being:
Now the encoding is broken:
Without the
downcase!
, the sanitize function would have fixed the problem just fine. With sanitize however, the encoding is broken.The text was updated successfully, but these errors were encountered: