~jtaylor/ubuntu/oneiric/gajim/multiple-CVE

« back to all changes in this revision

Viewing changes to src/common/caps.py

  • Committer: Bazaar Package Importer
  • Author(s): Nafallo Bjälevik
  • Date: 2009-06-12 13:49:19 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20090612134919-basez34an73qkkb1
Tags: 0.12.2-0ubuntu1
* New upstream bugfix release:
  + Better keepalive / ping behaviour
  + Fix custom port handling
  + Improve error messages handling
  + Totem support for played music
  + Fix SSL with some servers
  + Handle XFCE notification-daemon
  + Restore old behaviour of click on systray: left click to open events
  + Network manager 0.7 support
  + Improve Kerberos support
  + Many bugfixes here and there
  + Add -c option to history_manager
* debian/patches/00list:
  - Disable de-update.patch, since it doesn't apply
  - Drop svn-11058.patch since it is included in the new release
* debian/patches/svn-11058.patch:
  - Drop patch since it is included in the new release
* debian/control:
  - Bump required version for intltool as per upstream's requirements

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
                #        likely implement a fallback to disco (could be disabled
209
209
                #        for mobile users who pay for traffic)
210
210
                if contact.caps_hash_method == 'old':
211
 
                        features = self[(contact.caps_hash_method, contact.caps_node + '#' + \
212
 
                                contact.caps_hash)].features
 
211
                        if not contact.caps_node or not contact.caps_hash:
 
212
                                features = []
 
213
                        else:
 
214
                                features = self[('old', contact.caps_node + '#' + \
 
215
                                        contact.caps_hash)].features
213
216
                else:
214
 
                        features = self[(contact.caps_hash_method, contact.caps_hash)].features
 
217
                        features = self[(contact.caps_hash_method, contact.caps_hash)].\
 
218
                                features
215
219
                if feature in features or features == []:
216
220
                        return True
217
221
 
229
233
                # for disco... so that disco will learn how to interpret
230
234
                # these caps
231
235
                pm_ctrl = None
232
 
                jid = helpers.get_full_jid_from_iq(presence)
 
236
                try:
 
237
                        jid = helpers.get_full_jid_from_iq(presence)
 
238
                except:
 
239
                        # Bad jid
 
240
                        return
233
241
                contact = gajim.contacts.get_contact_from_full_jid(self.name, jid)
234
242
                if contact is None:
235
243
                        room_jid, nick = gajim.get_room_and_nick_from_fjid(jid)