[Bug 35239] Filter out illegal user names as per RFC 2812

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 21 15:29:05 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35239

--- Comment #6 from Will Thompson <will.thompson at collabora.co.uk> 2011-03-21 07:29:05 PDT ---
Review of attachment 44377:
 --> (https://bugs.freedesktop.org/review?bug=35239&attachment=44377)

This seems better than not handling ERROR at all.

::: src/idle-connection.c
@@ +857,3 @@
+    IdleConnection *conn = IDLE_CONNECTION(user_data);
+
+    connection_connect_cb(conn, FALSE,
TP_CONNECTION_STATUS_REASON_NETWORK_ERROR);

It'd be best to have Idle emit the
<http://telepathy.freedesktop.org/spec-snapshot/Connection.html#Signal:ConnectionError>
signal, which would let us include more information about what went wrong.
Specifically in this case, we could include the message the server sent us as
the 'server-message'. We could also define a new D-Bus error name,
"org.freedesktop.Telepathy.Error.InvalidParameter", and specify that when used
in ConnectionError, a 'parameters' key in the details would map to a list of
strings which are the named parameters which were rejected by the server.

This information ends up on the Account interface
<http://telepathy.freedesktop.org/spec-snapshot/Account.html#Property:ConnectionError>
and so Empathy's accounts dialog (for instance) could highlight the relevant
fields in red.

Can 'ERROR' be recieved after we're happily connected? If so it strikes me that
we might want to use different connection status reasons in different cases:
Authentication_Failed if it's while we're connecting, and Network_Error if it's
while we're already connected, for instance. (Also, does connection_connect_cb
handle being called while the connection's open?)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list