Content messaging delegate receives messages from all extensions
Categories
(GeckoView :: Extensions, defect, P1)
Tracking
(firefox68 wontfix, firefox69 fixed, firefox70 fixed)
People
(Reporter: agi, Assigned: agi)
Details
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
I noticed this while working on x86_64 test support.
Our Content messaging delegate doesn't check for which WebExtension is supposed to receive messages and just dispatches all of them, this is incorrect as each WebExtension should have it's own delegate.
We should change GeckoSession.setMessageDelegate
from:
@AnyThread
public void setMessageDelegate(@Nullable WebExtension.MessageDelegate delegate,
@NonNull String nativeApp)
to:
@AnyThread
public void setMessageDelegate(@Nullable WebExtension.MessageDelegate delegate,
@NonNull WebExtension webExtension,
@NonNull String nativeApp)
Comment 1•5 years ago
|
||
Agi says he has a fix.
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/715bf6e850b8 Make WebExtension listeners per-extension. r=snorp
Comment 4•5 years ago
|
||
bugherder |
Comment 5•5 years ago
|
||
Agi, do we need to uplift this fix to GV 69 Beta? Does Fenix/A-C need this fix? They will be updating to GV 69 Beta in a couple weeks.
Assignee | ||
Comment 6•5 years ago
|
||
It probably wouldn't hurt to uplift. Christian does Fenix/Reader mode need this?
Comment 7•5 years ago
|
||
Yes, I'd vote for uplifting to 69 beta, please.
Currently Fenix only has one web extension and can't run into this problem. However, there's an FxA extension in the works which will make use of this API and we shouldn't send its messages to other extensions.
Comment 8•5 years ago
|
||
(In reply to Christian Sadilek [:csadilek] from comment #7)
Yes, I'd vote for uplifting to 69 beta, please.
In that case, beta 69=affected.
Assignee | ||
Comment 9•5 years ago
|
||
Comment on attachment 9074044 [details]
Bug 1551278 - Make WebExtension listeners per-extension.
Beta/Release Uplift Approval Request
- User impact if declined: All built in WebExtensions in Fenix will broadcast messages to each other, potentially executing code in unintended ways.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This patch only affects GeckoView consumers using WebExtensions, no other code path is affected. The worst case scenario is that features that rely on WebExtensions are broken (currently ReaderMode and favicons in Fenix).
- String changes made/needed:
Comment 10•5 years ago
|
||
Comment on attachment 9074044 [details]
Bug 1551278 - Make WebExtension listeners per-extension.
GeckoView-only WebExtension patch. Approved for Beta69.
Comment 11•5 years ago
|
||
Looks like this needs a rebased patch for Beta uplift.
Assignee | ||
Comment 12•5 years ago
|
||
uplift |
Comment 13•2 years ago
|
||
Moving some extension bugs to the GeckoView::Extensions component.
Description
•