nsStandardURL incorrectly escapes ^ in the path
Categories
(Core :: Networking, defect, P3)
Tracking
()
People
(Reporter: valentin, Assigned: sekim)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [necko-triaged][necko-monitor])
Attachments
(1 file)
Reporter | ||
Comment 1•10 months 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 | )
Reporter | ||
Comment 3•6 months 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•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 5•6 months ago
|
||
bugherder |
Comment 6•6 months 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%3E1
fails to load.imap://user@localhost:39033/fetch%3EUID%3E%5EINBOX%3E1
works.imap://user@localhost:39033/fetch%3EUID%3E!INBOX%3E1
works.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•6 months 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•6 months ago
|
||
Backed out for causing various regressions.
https://hg.mozilla.org/integration/autoland/rev/6828700ebc4deb1264dcc86935f108140e038c96
Valentin, what are your thoughts on this bug?
Reporter | ||
Comment 10•3 months 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.
Description
•