Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5340)

Unified Diff: src/ibuspanelservice.c

Issue 335380043: Added DBus filtering against malware (Closed) Base URL: git@github.com:ibus/ibus.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ibusengine.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ibuspanelservice.c
diff --git a/src/ibuspanelservice.c b/src/ibuspanelservice.c
index 468aa324d0e1c4115341121a491e95d474a86abf..33949fa139af664bb9146f284c01d491f285af6c 100644
--- a/src/ibuspanelservice.c
+++ b/src/ibuspanelservice.c
@@ -3,7 +3,7 @@
/* ibus - The Input Bus
* Copyright (c) 2009-2014 Google Inc. All rights reserved.
* Copyright (C) 2010-2014 Peng Huang <shawn.p.huang@gmail.com>
- * Copyright (C) 2017 Takao Fujiwara <takao.fujiwara1@gmail.com>
+ * Copyright (C) 2017-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -936,6 +936,15 @@ _g_object_unref_if_floating (gpointer instance)
g_object_unref (instance);
}
+static gboolean
+ibus_panel_service_service_authorized_method (IBusService *service,
+ GDBusConnection *connection)
+{
+ if (ibus_service_get_connection (service) == connection)
+ return TRUE;
+ return FALSE;
+}
+
static void
ibus_panel_service_service_method_call (IBusService *service,
GDBusConnection *connection,
@@ -961,6 +970,9 @@ ibus_panel_service_service_method_call (IBusService *service,
return;
}
+ if (!ibus_panel_service_service_authorized_method (service, connection))
+ return;
+
if (g_strcmp0 (method_name, "UpdatePreeditText") == 0) {
GVariant *variant = NULL;
guint cursor = 0;
« no previous file with comments | « src/ibusengine.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b