[telepathy-mission-control/master] McdDispatchOperation: reject syntactically invalid client bus names

Simon McVittie simon.mcvittie at collabora.co.uk
Wed May 20 02:29:46 PDT 2009


---
 src/mcd-dispatch-operation.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 111ab1e..3864ddd 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -637,7 +637,9 @@ mcd_dispatch_operation_handle_with (McdDispatchOperation *operation,
 
     if (handler_path != NULL && handler_path[0] != '\0')
     {
-        if (!g_str_has_prefix (handler_path, MCD_CLIENT_BASE_NAME))
+        if (!g_str_has_prefix (handler_path, MCD_CLIENT_BASE_NAME) ||
+            !tp_dbus_check_valid_bus_name (handler_path,
+                                           TP_DBUS_NAME_TYPE_WELL_KNOWN, NULL))
         {
             DEBUG ("InvalidArgument: handler name %s is bad", handler_path);
             g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
-- 
1.5.6.5




More information about the telepathy-commits mailing list