Closed
Bug 1338758
Opened 8 years ago
Closed 8 years ago
Passing http://example.com/?p=%E9 to nsIExternalProtocolService.loadURI() opens http://example.com/?p = (truncated)
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla54
People
(Reporter: jorgk-bmo, Assigned: emk)
Details
Attachments
(1 file)
|
59 bytes,
text/x-review-board-request
|
m_kato
:
review+
jcristau
:
approval-mozilla-aurora+
jcristau
:
approval-mozilla-beta+
|
Details |
Passing http://example.com/?p=%E9 to nsIExternalProtocolService.loadURI() opens http://example.com/?p= (truncated)
What else can I say ;-)
We've come here from bug 770022 comment #48. Note that nsIExternalProtocolService.loadURI() is used in Thunderbird's mail/base/content/contentAreaClick.js.
| Reporter | ||
Comment 1•8 years ago
|
||
This debug code
printf("=== %s %s\n", urlCharset.get(), urlSpec.get());
if (NS_FAILED(textToSubURI->UnEscapeNonAsciiURI(urlCharset, urlSpec, utf16Spec))) {
CopyASCIItoUTF16(urlSpec, utf16Spec);
printf("=== failed!\n");
}
printf("=== %s\n", NS_ConvertUTF16toUTF8(utf16Spec).get());
gives:
=== UTF-8 http://example.com/?p=%E9
=== http://example.com/?p=
This seems to be an error in UnEscapeNonAsciiURI(). Masatoshi-san, care to take a look?
Flags: needinfo?(VYV03354)
| Reporter | ||
Comment 2•8 years ago
|
||
I should have mentioned, I added this here:
https://dxr.mozilla.org/mozilla-central/rev/855e6b2f6199189f37cea093cbdd1735e297e8aa/uriloader/exthandler/win/nsMIMEInfoWin.cpp#238
| Reporter | ||
Comment 3•8 years ago
|
||
More examples where the click works since UnEscapeNonAsciiURI() does report the error:
=== UTF-8 http://example.com/?p=%E9e
=== failed!
=== http://example.com/?p=%E9e
=== UTF-8 http://example.com/?p=%E9%E9
=== failed!
=== http://example.com/?p=%E9%E9
| Assignee | ||
Comment 4•8 years ago
|
||
Yeah, this is a bug if UnEscapeNonAsciiURI(). Thanks for catching this.
Flags: needinfo?(VYV03354)
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
| Reporter | ||
Comment 6•8 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #4)
> Thanks for catching this.
Thanks for fixing this ;-)
Comment 7•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8836325 [details]
Bug 1338758 - Handle success codes from nsIUnicodeDecoder in nsTextToSubURI::UnEscapeNonAsciiURI.
https://reviewboard.mozilla.org/r/111790/#review113178
Attachment #8836325 -
Flags: review?(m_kato) → review+
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/9aeb203f8d6f
Handle success codes from nsIUnicodeDecoder in nsTextToSubURI::UnEscapeNonAsciiURI. r=m_kato
Comment 9•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
| Reporter | ||
Comment 10•8 years ago
|
||
Masatoshi-san, thanks again for fixing this. Could you please request uplifts. This is essentially a one-line change which is well-covered by tests, so it shouldn't be risky to uplift.
| Assignee | ||
Comment 11•8 years ago
|
||
Comment on attachment 8836325 [details]
Bug 1338758 - Handle success codes from nsIUnicodeDecoder in nsTextToSubURI::UnEscapeNonAsciiURI.
Approval Request Comment
[Feature/Bug causing the regression]: N/A
[User impact if declined]: Sometimes ncorrect URLs will open when clicking some URLs on an e-mail view.
[Is this code covered by automated tests?]: Yes, unit tests added.
[Has the fix been verified in Nightly?]: Yes.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: None.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: This is essentially a one-line change which is well-covered by tests.
[String changes made/needed]: None.
Attachment #8836325 -
Flags: approval-mozilla-beta?
Attachment #8836325 -
Flags: approval-mozilla-aurora?
Comment 12•8 years ago
|
||
Comment on attachment 8836325 [details]
Bug 1338758 - Handle success codes from nsIUnicodeDecoder in nsTextToSubURI::UnEscapeNonAsciiURI.
UnEscapeNonAsciiURI fix, aurora53+, beta52+
Attachment #8836325 -
Flags: approval-mozilla-beta?
Attachment #8836325 -
Flags: approval-mozilla-beta+
Attachment #8836325 -
Flags: approval-mozilla-aurora?
Attachment #8836325 -
Flags: approval-mozilla-aurora+
Comment 13•8 years ago
|
||
| bugherder uplift | ||
status-firefox53:
--- → fixed
Comment 14•8 years ago
|
||
| bugherder uplift | ||
status-firefox52:
--- → fixed
Comment 15•8 years ago
|
||
| bugherder uplift | ||
status-firefox-esr52:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•