Philipp Hörist pushed to branch master at gajim / python-nbxmpp

Commits:

1 changed file:

Changes:

  • nbxmpp/modules/bookmarks.py
    ... ... @@ -140,6 +140,12 @@ class Bookmarks(BaseModule):
    140 140
                                       error)
    
    141 141
                     continue
    
    142 142
     
    
    143
    +            if jid.localpart is None or jid.resource is not None:
    
    144
    +                self._log.warning('Invalid JID: "%s", %s',
    
    145
    +                                  conf.getAttr('jid'),
    
    146
    +                                  error)
    
    147
    +                continue
    
    148
    +
    
    143 149
                 autojoin = self._parse_autojoin(conf.getAttr('autojoin'))
    
    144 150
                 nick = self._parse_nickname(conf.getTagData('nick'))
    
    145 151
                 name = conf.getAttr('name') or None
    
    ... ... @@ -170,6 +176,12 @@ class Bookmarks(BaseModule):
    170 176
                                   error)
    
    171 177
                 return None
    
    172 178
     
    
    179
    +        if jid.localpart is None or jid.resource is not None:
    
    180
    +            self._log.warning('Invalid JID: "%s", %s',
    
    181
    +                              item.getAttr('id'),
    
    182
    +                              error)
    
    183
    +            return None
    
    184
    +
    
    173 185
             autojoin = self._parse_autojoin(conference.getAttr('autojoin'))
    
    174 186
             nick = self._parse_nickname(conference.getTagData('nick'))
    
    175 187
             name = conference.getAttr('name') or None