ignore roster pushes from unknown sender. fixes #3098

This commit is contained in:
Yann Leboulanger 2007-09-26 09:26:26 +00:00
parent 96e6457c30
commit 06507c1b03
1 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,10 @@ class Roster(PlugIn):
def RosterIqHandler(self,dis,stanza): def RosterIqHandler(self,dis,stanza):
""" Subscription tracker. Used internally for setting items state in """ Subscription tracker. Used internally for setting items state in
internal roster representation. """ internal roster representation. """
sender = stanza.getAttr('from')
if not sender == None: and not sender.bareMatch(
self._owner.User + '@' + self._owner.Server):
return
for item in stanza.getTag('query').getTags('item'): for item in stanza.getTag('query').getTags('item'):
jid=item.getAttr('jid') jid=item.getAttr('jid')
if item.getAttr('subscription')=='remove': if item.getAttr('subscription')=='remove':