Closed Bug 379053 Opened 15 years ago Closed 13 years ago

Cannot send attachments with "%20" in name

Categories

(MailNews Core :: Attachments, defect)

1.8 Branch
x86
Windows 2000
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: imark, Unassigned)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: version 2.0.0.0 (20070326)

Sending a message with a an attachment that has "%20" in the file name causes this error:

Sending of message failed:
Unable to open the temporary file "blah\blah\file%20name". Check your temporary directory settings.



Reproducible: Always

Steps to Reproduce:
1. Create a file with a name like "test%20file.txt"
2. Attach it to a new message and send.
3.
Actual Results:  
Sending of message failed.

Expected Results:  
Message should send.

Adobe Acrobat creates files with this kind of name and tries to send them via Thunderbird (using MAPI) when inviting others to participate in a browser-based review.  

This was not a problem in versions of Thunderbird prior to 2.0.0. 

Workaround - don't include spaces in filenames that will be sent for review in Acrobat.
The problem also occurs with some folder names.  For example, you cannot send a file that is in a folder named "C:\80%CD".  I imagine the %C is being misinterpreted.

Workaround: rename the directory to omit the percent sign.
JFY.
Probably occurs when all strings same as "Escaped Encoding" of RFC2396. 
 ( http://www.faqs.org/rfcs/rfc2396.html )
> 2.4.1. Escaped Encoding
>(snip)
>     escaped     = "%" hex hex
>     hex         = digit | "A" | "B" | "C" | "D" | "E" | "F" |
>                           "a" | "b" | "c" | "d" | "e" | "f"
>Note: digit = "0" | "1" | ... | "9"
And it may be slightly complex than usual when "%25", because it's escaped format of "%". See Bug 93666 for "%25" related problem in the past.
Not a problem on linux... (tried the test%20file.txt)
Version: unspecified → 2.0
Duplicate of this bug: 380510
The problem does not occur on Mac OS X 10.3.9.  Guess it is just a Windows thing.
(In reply to comment #0)
> Adobe Acrobat creates files with this kind of name and tries to send them via
> Thunderbird (using MAPI) when inviting others to participate in a browser-based
> review.  

> Sending of message failed:
> Unable to open the temporary file "blah\blah\file%20name". Check your temporary
> directory settings.

When latest-trunk of Tb(2007/5/13 build, MS Win-XP SP2, new profile), and when attached file name is "xxxx%20xxxx.txt"(attached by drag&drop instead of thru MAPI), file name in the error message was "xxxx xxxx.txt"(%20 is unescaped to a space).   

Was "blah\blah\file%20name" displayed in error message?
(When MAPI, different escaping/unescaping process from one on drag&drop can occur.)
Either Drag & Drop, or using te "Attach" dialog, the results were the same:

The Compose window shows (e.g.) "Test%20X.txt", and the error message shows "test X.txt".
Sorry, did not see how to add attachmment to comment, so I did this after.
Same test result as comment #6 with Seamonkey latest-trunk(2007/5/15 build,ZIP).
Changing to Produnt=Core.
Assignee: mscott → nobody
Component: Message Compose Window → MailNews: Attachments
Product: Thunderbird → Core
QA Contact: message-compose → attachments
Version: 2.0 → Trunk
Confirming based on test result in commnent #6, comment #7 and comment #9.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Duplicate of this bug: 389374
Example of same failure when attaching a file with a Hebrew filenames
The filename in hex was:
file:///C:/Users/Itay/Documents/Updater5/%D7%94%D7%A9%D7%99%D7%97%D7%94%20%D7%A2%D7%9D%20%D7%A1%D7%99%D7%9C%D7%91%D7%99.doc

Windows Vista system
I came across this error trying to attach pictures in b:\My%20Pictures\. b: is a mapped network drive to a linux server.

As a work-around I created My Pictures as a symbolic link to My%20Pictures and this resolved the issue. I vaguely remember renaming My Pictures to My%20Pictures to resolve an issue with an earlier version of Thunderbird (1.x.x)
(In reply to comment #12)
> Created an attachment (id=281491) [details]
> Screen shot of bug with Hebrew filename
> 
> Example of same failure when attaching a file with a Hebrew filenames

non-ascii chars in filename/path is Bug 332110 (and Bug 234681)
Root problem looks to be Bug 397815.
Setting 397815 in dependency. Please remove, if it's wrong.
Depends on: 397815
Bug 397815 is a Firefox bug.
No longer depends on: 397815
(In reply to comment #16)
> Bug 397815 is a Firefox bug.
Gavin, decoding/encoding URI(and escaping/unescaping) is common function(core issue), isn't it? 
(In reply to comment #17)
> (In reply to comment #16)
> > Bug 397815 is a Firefox bug.
> Gavin, decoding/encoding URI(and escaping/unescaping) is common function(core
> issue), isn't it? 

Firefox also uses core functions to do decoding/encoding, sure, but bug 397815 isn't about a bug in the core functions. It's about a bug in Firefox that's not using them correctly. It's not related to a mailnews bug at all.
(In reply to comment #18)
> bug 397815 isn't about a bug in the core functions. 
> It's about a bug in Firefox that's not using them correctly.

Gavin, thanks for your explanation.
This bug is probably problem that Tb doesn't use them correctly.
WFM with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1pre) Gecko/2008063003 Thunderbird/3.0a2pre ID:2008063003
Product: Core → MailNews Core
Duplicate of this bug: 461708
Duplicate of this bug: 455925
everyone agree this is fixed in TB3 beta?  (ref comment 20)
Version: Trunk → 1.8 Branch
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4pre) Gecko/20090915 Shredder/3.0b4pre

Shredder/3.0b4pre didn't produce error, generated next header, and file content was  attached.
> Content-Disposition: attachment; filename="txt X%20Y.txt"
WFM also, and quite sure this is a dupe.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Whiteboard: dupeme
Whiteboard: dupeme
You need to log in before you can comment on or make changes to this bug.