Attachment filename of length 60 fails rfc2331 encoding

UNCONFIRMED
Unassigned

Status

UNCONFIRMED
3 years ago
3 years ago

People

(Reporter: vesely, Unassigned)

Tracking

38 Branch

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
Created attachment 8759984 [details]
The message with the described attachment, sent to myself

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.8.0
Build ID: 20160426225641

Steps to reproduce:

Create a filename consisting of a basename of 60 characters and an extension, such that the last character in the basename is a quotation mark.  For example:

This is a "58 chars string in double quotes", tot length 60.txt



Actual results:

The filename gets wrongly encoded as follows:
 filename*0="This is a \"58 chars string in double quotes, tot length 60\";
 filename*1="".txt"



Expected results:

The closing quotation mark should have been in filename*0
(Reporter)

Comment 1

3 years ago
Created attachment 8759985 [details]
Screenshot of the message with such attachment
(Reporter)

Comment 2

3 years ago
To be clearer, the following 4 filenames result in the subsequent 4 header fields, where only the second one is wrong.  Just look at the total length:

This is a "57 char string in double quotes, tot length 59".txt
This is a "57 chars string in double quotes, tot length 60".txt
This is a "58 chars string in double quotes", tot length 60.txt
This is a "57 char string in double quotes, total length 61".txt



Content-Disposition: attachment;
 filename*0="This is a \"57 char string in double quotes, tot length 59\"";
 filename*1=".txt"

Content-Disposition: attachment;
 filename*0="This is a \"57 chars string in double quotes, tot length 60\";
 filename*1="".txt"

Content-Disposition: attachment;
 filename*0="This is a \"58 chars string in double quotes\", tot length 6";
 filename*1="0.txt"

Content-Disposition: attachment;
 filename*0="This is a \"57 char string in double quotes, total length 61";
 filename*1="\".txt"
You need to log in before you can comment on or make changes to this bug.