[Telepathy-commits] [telepathy-gabble/master] Reject 1-1 tubes requests containing unknown properties

Will Thompson will.thompson at collabora.co.uk
Tue Sep 16 04:17:45 PDT 2008


---
 src/private-tubes-factory.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c
index 3054e4e..4704f1a 100644
--- a/src/private-tubes-factory.c
+++ b/src/private-tubes-factory.c
@@ -554,6 +554,12 @@ gabble_private_tubes_factory_iface_init (gpointer g_iface,
 }
 
 
+static const gchar * const tubes_channel_fixed_properties[] = {
+    TP_IFACE_CHANNEL ".ChannelType",
+    TP_IFACE_CHANNEL ".TargetHandleType",
+    NULL
+};
+
 static const gchar * const tubes_channel_allowed_properties[] = {
     TP_IFACE_CHANNEL ".TargetHandle",
     NULL
@@ -613,6 +619,11 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self,
   if (!tp_handle_is_valid (contact_repo, handle, &error))
     goto error;
 
+  if (tp_channel_manager_asv_has_unknown_properties (request_properties,
+          tubes_channel_fixed_properties, tubes_channel_allowed_properties,
+          &error))
+    goto error;
+
   /* Don't support opening a channel to our self handle */
   if (handle == base_conn->self_handle)
     {
-- 
1.5.6.5




More information about the Telepathy-commits mailing list