Closed
Bug 177964
Opened 22 years ago
Closed 22 years ago
FTP: can't download file with # in its name
Categories
(Core Graveyard :: Networking: FTP, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.3alpha
People
(Reporter: jruderman, Assigned: neeti)
References
Details
(Keywords: regression, testcase)
Attachments
(3 files)
988 bytes,
patch
|
dougt
:
review-
|
Details | Diff | Splinter Review |
1.04 KB,
patch
|
nhottanscp
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
1.04 KB,
patch
|
nhottanscp
:
review+
darin.moz
:
superreview+
asa
:
approval1.3a+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. Log into Jeff's ftp with Phoenix 10/26 or with Mozilla. 2. Go to /upload/Hack_Sign/. 3. Look for episode 17 and click the link. Result: "No such file or directory". Filename: /upload/Hack_Sign/[#Anime-Kraze]_Hack_17[SBC_HQ_DIVX].avi Error: 550 /upload/Hack_Sign/[: No such file or directory. The steps above work correctly in Internet Explorer and Netscape 4, but they give an error message in Mozilla and Opera. If I copy the URL, paste it into the address bar, replace the # with %23, and press enter, I am able to download the file with Mozilla. Old, related bugs: bug 27741 [fixed] can't visit directorys with ftp that include # or : bug 77937 [fixed] '#''s in ftp url's dont work [as hashes pointing to anchors] The bug seems to be in in the code that generates the HTML directory listing. It should convert # to %23 in the link URLs (like Netscape 4 does) so that when I click to download a file with # in its name, the link works correctly.
Mozilla 1.2a - I've confirmed this. The directory displays "#", but does not provide the correct link. I thought we had covered the handling of "#", but I had forgotten to test for the directory display's mapping of special characters to URLs for the filenames themselves.
Comment 2•22 years ago
|
||
Yes, obviously the links are not escaped correctly (esc_FileBaseName-Mask) before handed over to ftp.
similar: bug 180161
Comment 7•22 years ago
|
||
Comment on attachment 108082 [details] [diff] [review] proposed patch the call to NS_EscapeURL leaks.
Attachment #108082 -
Flags: review-
Comment 8•22 years ago
|
||
nhotta, could you look at this patch (ignoring the leak). i believe this problem to be regression caused by our fix for 165585. Does this patch cause the same problem that we had with 165585?
Comment 9•22 years ago
|
||
I think non ASCII characters would be all escaped. Is it possible to escape only characters which really need to be escaped? Also ToNewCString(unEscapeSpec) cannot be used for Unicode which may contain characters greater than 255.
Assignee | ||
Comment 10•22 years ago
|
||
Attachment #108253 -
Flags: superreview?(darin)
Attachment #108253 -
Flags: review?(nhotta)
Comment 11•22 years ago
|
||
Comment on attachment 108253 [details] [diff] [review] revised patch + NS_ConvertUCS2toUTF8 ucs2UnEscapeSpec(unEscapeSpec); please change the variable name to something like utf8UnEscapeSpec because the string is UTF-8.
Attachment #108253 -
Flags: review?(nhotta) → review+
Assignee | ||
Comment 12•22 years ago
|
||
Updated•22 years ago
|
Attachment #108256 -
Flags: review+
Comment 13•22 years ago
|
||
Comment on attachment 108253 [details] [diff] [review] revised patch >Index: nsIndexedToHTML.cpp >+ NS_ConvertUCS2toUTF8 ucs2UnEscapeSpec(unEscapeSpec); nit: ucs2UnEscapeSpec is not UCS2, but UTF8. might be better to use a name like utf8UnEscapeSpec. sr=darin (no need to submit another patch)
Attachment #108253 -
Flags: superreview?(darin) → superreview+
Comment 14•22 years ago
|
||
Comment on attachment 108256 [details] [diff] [review] revised patch, changed variable name sr=darin (whoops!! i hadn't noticed that you already fixed this)
Attachment #108256 -
Flags: superreview+
Comment 15•22 years ago
|
||
Comment on attachment 108256 [details] [diff] [review] revised patch, changed variable name a=asa for checkin to 1.3a
Attachment #108256 -
Flags: approval1.3a?
Updated•22 years ago
|
Attachment #108256 -
Flags: approval1.3a? → approval1.3a+
Comment 16•22 years ago
|
||
cc to ylong for i18n verification once checked in
Assignee | ||
Comment 17•22 years ago
|
||
fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.3alpha
Comment 18•22 years ago
|
||
> cc to ylong for i18n verification once checked in
verified download works with:
"#" + double byte characters
"#" + single byte and double byte characters
named file on an internal ftp site.
Comment 19•22 years ago
|
||
*** Bug 189708 has been marked as a duplicate of this bug. ***
Comment 20•22 years ago
|
||
+regression. I was poking around w/ the duplicate, and noticed that this works in Netscape 7.0.1 (Mozilla 1.0.2), and Chimera 0.6 (branch?). Is this something that regressed recently?
Keywords: regression
Comment 21•22 years ago
|
||
VERIFIED: Mozilla 1.3f, Win98
Keywords: testcase
Whiteboard: checkmac checklinux
Comment 22•21 years ago
|
||
VERIFIED: mozilla 1.4b, Linux+Mach-O
Status: RESOLVED → VERIFIED
Whiteboard: checkmac checklinux
Updated•3 months ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•