prevent affiliatio spoofing by checking namespace. Fixes #4323
This commit is contained in:
parent
330dd0e7a1
commit
3e2f9fcbec
|
@ -502,10 +502,14 @@ class Presence(Protocol):
|
|||
|
||||
def _muc_getItemAttr(self,tag,attr):
|
||||
for xtag in self.getTags('x'):
|
||||
if xtag.getNamespace() not in (NS_MUC_USER, NS_MUC_ADMIN):
|
||||
continue
|
||||
for child in xtag.getTags(tag):
|
||||
return child.getAttr(attr)
|
||||
def _muc_getSubTagDataAttr(self,tag,attr):
|
||||
for xtag in self.getTags('x'):
|
||||
if xtag.getNamespace() not in (NS_MUC_USER, NS_MUC_ADMIN):
|
||||
continue
|
||||
for child in xtag.getTags('item'):
|
||||
for cchild in child.getTags(tag):
|
||||
return cchild.getData(),cchild.getAttr(attr)
|
||||
|
|
Loading…
Reference in New Issue