[gnome-shell] notificationDaemon: Guard against invalid D-Bus object paths
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] notificationDaemon: Guard against invalid D-Bus object paths
- Date: Mon, 25 Sep 2017 14:59:14 +0000 (UTC)
commit 1ef8722c52d8e88041b3af61c0ee082c2b40dee7
Author: Krzesimir Nowak <krzesimir kinvolk io>
Date: Fri Nov 18 15:52:46 2016 +0100
notificationDaemon: Guard against invalid D-Bus object paths
When making any D-Bus call through the GDBus' proxy wrapper with an
invalid D-Bus object path, gnome-shell hangs.
Supposedly FdoApplicationProxy constructor should validate the passed
D-Bus object path and throw an error if the path is invalid. Since it
does not do that, we work it around by making sure that the deduced
D-Bus object path is valid or throw an exception if the path is not.
https://bugzilla.gnome.org/show_bug.cgi?id=787902
js/ui/notificationDaemon.js | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index ed8870f..84bfec4 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -687,6 +687,8 @@ var GtkNotificationDaemonAppSource = new Lang.Class({
_init: function(appId) {
this._appId = appId;
this._objectPath = objectPathFromAppId(appId);
+ if (!GLib.Variant.is_object_path(this._objectPath))
+ throw new InvalidAppError();
this._app = Shell.AppSystem.get_default().lookup_app(appId + '.desktop');
if (!this._app)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]