Filename containig "。" when downloaded could turn into "%u3002"
Categories
(Core :: Internationalization, defect, P2)
Tracking
()
People
(Reporter: kzyswd, Assigned: emk, NeedInfo)
References
(Regression)
Details
(Keywords: parity-chrome, regression)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
Steps to reproduce:
Download a file that contains "。" in filename.
Actual results:
Depending on the website, the character "。" in filename of downloaded file could turn into "%u3002".
Expected results:
Character "。" in filename stays as "。".
Test files (file could expire, please let me know and I'll try to re-upload)
Not affected: https://gofile.io/d/1ksLLf
Affected: https://volafile.org/r/1hhg8xmnc
Characters with UTF-16 %u3001 (、) and %u3003 (〃) were not affected. Only %u3002 (。) for some reason.
Comment 2•4 years ago
|
||
#1 regression window("、。〃" -> "%u3001%u3002%u3003"):
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=992784f79f96&tochange=f884c46fa07d
#2 partially progression("、。〃" -> "、%u3002〃"):
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=febe82aa4ed2&tochange=265e01c7ff55
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Bug 1101625 partially fixed the problem. The actual regressor is bug 415491.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 4•4 years ago
|
||
Masatoshi, Makoto - do you plan to take this? It's P2 without an assignee, so I'd like to either downgrade it or assign. :)
Assignee | ||
Comment 5•4 years ago
|
||
I'm fine with taking this, but what is the desirable behavior? Should we just stop escaping characters in UnEscapeURIForUI
and WONTFIXing bug 415491?
Comment 6•4 years ago
|
||
Zibi asked me to comment on this but: Why do we use the escaping format %uHHHH
for anyhing at all? Or is that escape coming from the site? (The test case has expired.)
Assignee | ||
Comment 7•4 years ago
|
||
That's bug 1248812.
Reuploaded test files just in case
Not affected: https://gofile.io/d/oMT5cG
Affected: https://volafile.org/r/1hhg8xmnc
Assignee | ||
Comment 9•4 years ago
|
||
Not affected: https://gofile.io/d/oMT5cG
If the Content-Disposition:
header gives a filename, this bug does not affect the filename.
Affected: https://volafile.org/r/1hhg8xmnc
Otherwise, filename would be derived from the URL and this bug affect the filename.
IMO it does not make sense to escape the downloaded file names given that we do not escape filenames from the Content-Disposition:
header and it is not considered as a vulnerability. We should stop calling unEscapeURIForUI
to derive filenames from the URL instead of tweaking unEscapeURIForUI
.
Taking the bug.
Reporter | ||
Comment 10•3 years ago
|
||
Another char with similar problem.
‐
(hyphen %u2010)
Comment 11•3 years ago
|
||
:emk - any progress on this bug? Wanted to check if the NI on :m_kato is still needed.
Assignee | ||
Comment 12•3 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #9)
If the
Content-Disposition:
header gives a filename, this bug does not affect the filename.
Correction: If the Content-Disposition:
header gives a filename with raw utf-8 characters (such as gofile.io
), this bug does not affect the filename. If the Content-Disposition:
header gives a filename with the rfc 6266 format, this bug affects the filename.
Assignee | ||
Comment 13•3 years ago
|
||
Assignee | ||
Comment 14•3 years ago
|
||
Depends on D134401
Assignee | ||
Comment 15•3 years ago
|
||
Depends on D134402
Assignee | ||
Updated•3 years ago
|
Comment 16•3 years ago
|
||
Comment 17•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4242ce68dcc9
https://hg.mozilla.org/mozilla-central/rev/a10592d98dcd
https://hg.mozilla.org/mozilla-central/rev/4bab917cdac4
Assignee | ||
Comment 18•3 years ago
|
||
The problem was not fixed somehow. Reopening.
Updated•3 years ago
|
Assignee | ||
Comment 19•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 20•3 years ago
|
||
Comment 21•3 years ago
|
||
Backed out for bc failures browser_download_open_with_internal_handler.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/daf2f92f1a17c468659020e8167a68628c1446d5
Log link: https://treeherder.mozilla.org/logviewer?job_id=362690401&repo=autoland&lineNumber=3365
Assignee | ||
Comment 22•3 years ago
|
||
Some other tests in the same directory assume that the download list is empty at first. I'll add a cleanup function.
Comment 23•3 years ago
|
||
Comment 24•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•