nsStandardURL incorrectly escapes ^ in the path
Categories
(Core :: Networking, defect, P3)
Tracking
()
People
(Reporter: valentin, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged][necko-monitor])
Attachments
(1 obsolete file)
| Reporter | ||
Comment 1•2 years ago
|
||
The failing tests are:
Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\]^_{|}~> without base`
For Firefox:
!EQ("wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~", "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~")
Chrome result:
!EQ("wss://host/%20!%22$%&'()+,-./:;%3C=%3E@[/]^_%60%7B|%7D~", "wss://host/%20!%22$%&'()+,-./:;%3C=%3E@[/]%5E_%60%7B%7C%7D~")
(they are escaping both ^ and | )
Updated•1 year ago
|
Comment 2•1 year ago
|
||
Updated•1 year ago
|
| Reporter | ||
Comment 3•1 year ago
|
||
Note that ^ is a separator in the origin serialization.
We need to make sure we don't break the ability to deserialize them:
https://searchfox.org/mozilla-central/rev/f60bb10a5fe6936f9e9f9e8a90d52c18a0ffd818/caps/tests/unit/test_site_origin.js#17
Assert.equal(prinicpal1.origin, "http://example.com^userContextId=11");
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 5•1 year ago
|
||
| bugherder | ||
Comment 6•1 year ago
|
||
Is there a chance this broke something in the page loading code? I've been having problems with a test that loads a URL containing ^ in various places. Instead of loading in the docShell we somehow end up at the external protocol service. I've been assuming it's a problem in our (Thunderbird's) networking code, and it probably is, but I can't find anything. (Bug 1899673 comment 3.)
The url is of the form imap://user@localhost:39033/fetch%3EUID%3E^INBOX%3E1.
imap://user@localhost:39033/fetch%3EUID%3E^INBOX%3E1fails to load.imap://user@localhost:39033/fetch%3EUID%3E%5EINBOX%3E1works.imap://user@localhost:39033/fetch%3EUID%3E!INBOX%3E1works.imap://user@localhost:39033/fetch%3EUID%3E!INBOX%3E1?test^test(^in query) works.imap://user@localhost:39033/fetch%3EUID%3E!INBOX%3E1&test^test(^in path) fails.imap://user@localhost:39033/fetch%3EUID%3E!INBOX%3E1&test^works.
| Reporter | ||
Comment 7•1 year ago
|
||
I left a comment on 1899673 - I think the problem is how ImapURL uses the ^ character as a replacement for /.
Let me know if replacing ^ with { or another character that's not allowed in URL paths works
Comment 8•1 year ago
|
||
Backed out for causing various regressions.
https://hg.mozilla.org/integration/autoland/rev/6828700ebc4deb1264dcc86935f108140e038c96
Comment 9•1 year ago
|
||
Valentin, what are your thoughts on this bug?
| Reporter | ||
Comment 10•1 year ago
|
||
Let's leave this in the backlog for now.
We might be able to fix it at some point in the future, but right now the effort needed might be too large for the payoff.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Reporter | ||
Comment 11•1 year ago
|
||
See https://github.com/whatwg/url/issues/607#issuecomment-2511101350
The URL standard might end up aligning with Chromium, which means ^ would be escaped in paths.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•