[Telepathy-commits] [telepathy-glib/master] TpConnectionManager: always treat "password" and keys ending with "-password" as secret

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Feb 12 05:10:25 PST 2009


As recommended by the spec, and consistently with telepathy-qt4.
---
 telepathy-glib/connection-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index ed6696a..c7b67fa 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -867,6 +867,12 @@ tp_connection_manager_read_file (TpConnectionManager *self,
 
               param->dbus_signature = g_strdup (strv[0]);
 
+              if (!tp_strdiff (param->name, "password") ||
+                  g_str_has_suffix (param->name, "-password"))
+                {
+                  param->flags |= TP_CONN_MGR_PARAM_FLAG_SECRET;
+                }
+
               for (iter = strv + 1; *iter != NULL; iter++)
                 {
                   if (!tp_strdiff (*iter, "required"))
-- 
1.5.6.5




More information about the telepathy-commits mailing list