Commit eee1ab48 authored by Florian Müllner's avatar Florian Müllner

introspect: Fix whitelist check

The whitelist is a list of well-known D-Bus names, which we then search
for the unique name we get from the method invocation - unsuccesfully.

Fix this by watching the bus for any name in the whitelist in order
to maintain a map from wel-known to unique name that we can use for

parent 42eb9f4a
......@@ -40,6 +40,15 @@ var IntrospectService = class {
this._whitelistMap = new Map();
APP_WHITELIST.forEach(appName => {
(conn, name, owner) => this._whitelistMap.set(name, owner),
(conn, name) => this._whitelistMap.delete(name));
_isStandaloneApp(app) {
......@@ -51,7 +60,7 @@ var IntrospectService = class {
_isSenderWhitelisted(sender) {
return APP_WHITELIST.includes(sender);
return [...this._whitelistMap.values()].includes(sender);
_getSandboxedAppId(app) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment