GeckoViewPushController::createScopeAndPrincipal doesn't split scopeAndPrincipal correctly
Categories
(GeckoView :: General, defect, P2)
Tracking
(firefox96 fixed)
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: agi, Assigned: jonalmeida)
Details
(Keywords: good-first-bug, Whiteboard: [geckoview:m86])
Attachments
(1 file)
:nika pointed this out, from matrix:
nika: Super random thing, but I stumbled onto this code while reviewing some patches: https://searchfox.org/mozilla-central/rev/de782976bf97669f1e8edee59e7a2398154efe06/mobile/android/modules/geckoview/GeckoViewPushController.jsm#27
This split call is unfortunately wrong here. If you need to manually split originAttributes from the origin string you're supposed to do it by splitting on the rightmost ^ character, like is done here: https://searchfox.org/mozilla-central/rev/de782976bf97669f1e8edee59e7a2398154efe06/caps/OriginAttributes.cpp#355
I'm unsure this has any real impacts on anything, but figured I'd let y'all know :-)
You might have a better bet using createContentPrincipalFromOrigin(scopeAndAttrs) and then fetching back out the scope value using principal.URI.spec
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Pushed by jonalmeida942@gmail.com: https://hg.mozilla.org/integration/autoland/rev/55d2a0657f4c Use createContentPrincipalFromOrigin to split scopeAndPrincipal r=geckoview-reviewers,agi
Comment 3•2 years ago
|
||
bugherder |
Description
•