Tighten replacement bar plugin boundaries

Reported-by: Roger Piñol <rogerpicar@gmail.com>
This commit is contained in:
acrogenesis committed 2026-09-02 11:03:03 -06:00
1 parent 19985314c2
commit 094c913065
12 files changed
+206 -24

No files matched your search

+8 -2
View File
@@ -232,10 +232,16 @@ Item {
if (pluginBarApis[key]) return pluginBarApis[key]
var pluginShell = null
if (registered && root.shell && typeof root.shell.pluginShellForId === "function")
if (registered && root.shell && typeof root.shell.pluginShellForId === "function") {
// Only the trusted built-in bar receives ShellRoot and can request a
// service-capable facade for the widget it is instantiating.
pluginShell = root.shell.pluginShellForId(moduleName)
else if (!registered && root.shell && typeof root.shell.pluginShellForBarEntry === "function")
} else if (root.shell && typeof root.shell.pluginShellForBarEntry === "function") {
// Replacement bars receive a service-less entry facade. Giving an
// untrusted bar a generic facade factory would let it retrieve another
// third-party plugin's live service object.
pluginShell = root.shell.pluginShellForBarEntry(key, moduleName)
}
var api = pluginBarApiComponent.createObject(null, {
pluginId: key,