ignore transports with wrong jid. fixes #2574
This commit is contained in:
parent
6ca90b0a9f
commit
0c0c81ca03
|
@ -690,6 +690,13 @@ class ConnectionDisco:
|
||||||
attr = {}
|
attr = {}
|
||||||
for key in i.getAttrs():
|
for key in i.getAttrs():
|
||||||
attr[key] = i.getAttrs()[key]
|
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)
|
items.append(attr)
|
||||||
jid = helpers.get_full_jid_from_iq(iq_obj)
|
jid = helpers.get_full_jid_from_iq(iq_obj)
|
||||||
hostname = gajim.config.get_per('accounts', self.name,
|
hostname = gajim.config.get_per('accounts', self.name,
|
||||||
|
|
|
@ -185,8 +185,7 @@ class NamePrep:
|
||||||
prohibiteds = [unichr(n) for n in range(0x00, 0x2c + 1) +
|
prohibiteds = [unichr(n) for n in range(0x00, 0x2c + 1) +
|
||||||
range(0x2e, 0x2f + 1) +
|
range(0x2e, 0x2f + 1) +
|
||||||
range(0x3a, 0x40 + 1) +
|
range(0x3a, 0x40 + 1) +
|
||||||
range(0x5b, 0x5e + 1) +
|
range(0x5b, 0x60 + 1) +
|
||||||
range(0x60, 0x60 + 1) +
|
|
||||||
range(0x7b, 0x7f + 1) ]
|
range(0x7b, 0x7f + 1) ]
|
||||||
|
|
||||||
def prepare(self, string):
|
def prepare(self, string):
|
||||||
|
|
Loading…
Reference in New Issue