From 28a5263cd36ef44a006cfc0543d62328e06fec4a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 19 Jan 2006 19:52:51 +0000 Subject: [PATCH] stringprep room jids when we want to join a room --- src/dialogs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dialogs.py b/src/dialogs.py index e34fb6f38..e7ce67f35 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -786,6 +786,12 @@ _('You can not join a group chat unless you are connected.')).get_response() server = self.xml.get_widget('server_entry').get_text().decode('utf-8') password = self.xml.get_widget('password_entry').get_text().decode('utf-8') jid = '%s@%s' % (room, server) + try: + jid = helpers.parse_jid(jid) + except: + ErrorDialog(_('Invalid room or server name'), + _('The room name or server name has not allowed characters.') + if jid in self.recently_groupchat: self.recently_groupchat.remove(jid) self.recently_groupchat.insert(0, jid)