diff options
author | Marvin W <git@larma.de> | 2019-12-22 04:10:53 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2019-12-23 16:58:53 +0100 |
commit | a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d (patch) | |
tree | cbb079649066c2001b6d6881137108e70eed9d3f /plugins/omemo/src/logic/manager.vala | |
parent | 3218dc0211ac717230fe03fad82681a626d968b5 (diff) | |
download | dino-a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d.tar.gz dino-a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d.zip |
Properly check Jids everywhere
Diffstat (limited to 'plugins/omemo/src/logic/manager.vala')
-rw-r--r-- | plugins/omemo/src/logic/manager.vala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/omemo/src/logic/manager.vala b/plugins/omemo/src/logic/manager.vala index 2bbd918c..98280a8b 100644 --- a/plugins/omemo/src/logic/manager.vala +++ b/plugins/omemo/src/logic/manager.vala @@ -202,8 +202,12 @@ public class Manager : StreamInteractionModule, Object { //Fetch the bundle for each new device int inc = 0; foreach (Row row in db.identity_meta.get_unknown_devices(identity_id, jid.bare_jid.to_string())) { - module.fetch_bundle(stream, Jid.parse(row[db.identity_meta.address_name]), row[db.identity_meta.device_id], false); - inc++; + try { + module.fetch_bundle(stream, new Jid(row[db.identity_meta.address_name]), row[db.identity_meta.device_id], false); + inc++; + } catch (InvalidJidError e) { + warning("Ignoring device with invalid Jid: %s", e.message); + } } if (inc > 0) { debug("new bundles %i/%i for %s", inc, device_list.size, jid.to_string()); |