ignore transports with wrong jid. fixes #2574

This commit is contained in:
Yann Leboulanger 2006-10-17 10:09:11 +00:00
parent 6ca90b0a9f
commit 0c0c81ca03
2 changed files with 8 additions and 2 deletions

View File

@ -690,6 +690,13 @@ class ConnectionDisco:
attr = {}
for key in i.getAttrs():
attr[key] = i.getAttrs()[key]
if 'jid' not in attr:
continue
try:
helpers.parse_jid(attr['jid'])
except:
# jid is not conform
continue
items.append(attr)
jid = helpers.get_full_jid_from_iq(iq_obj)
hostname = gajim.config.get_per('accounts', self.name,

View File

@ -185,8 +185,7 @@ class NamePrep:
prohibiteds = [unichr(n) for n in range(0x00, 0x2c + 1) +
range(0x2e, 0x2f + 1) +
range(0x3a, 0x40 + 1) +
range(0x5b, 0x5e + 1) +
range(0x60, 0x60 + 1) +
range(0x5b, 0x60 + 1) +
range(0x7b, 0x7f + 1) ]
def prepare(self, string):