Philipp Hörist pushed to branch master at gajim / gajim

Commits:
0707f1a2 by Emmanuel Gil Peyrot at 2017-12-15T02:40:53+01:00
Fix xmpp: URI handling.

It was previously removing the first three characters of the JID, and
ignored any URI without an action.

- - - - -
df762976 by Philipp Hörist at 2017-12-15T21:22:00+01:00
Merge branch 'fix-uri-handling' into 'master'

Fix xmpp: URI handling.

See merge request gajim/gajim!170
- - - - -


1 changed file:

- gajim/gajim.py


Changes:

=====================================
gajim/gajim.py
=====================================
--- a/gajim/gajim.py
+++ b/gajim/gajim.py
@@ -239,13 +239,15 @@ class GajimApplication(Gtk.Application):
         for arg in file:
             uri = arg.get_uri()
             app.log('uri_handler').info('open %s', uri)
-            # remove xmpp:///
-            uri = uri[8:]
+            if not uri.startswith('xmpp:'):
+                continue
+            # remove xmpp:
+            uri = uri[5:]
             try:
                 jid, cmd = uri.split('?')
             except ValueError:
-                # Invalid URI
-                return
+                # No query argument
+                jid, cmd = uri, 'message'
             if cmd == 'join':
                 self.interface.join_gc_minimal(None, jid)
             elif cmd == 'roster':



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/d858ff5171724af4bae68e725d6b293b63e8ec0e...df7629764089206f6662dd23f84325c0bd45e72d

---
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/d858ff5171724af4bae68e725d6b293b63e8ec0e...df7629764089206f6662dd23f84325c0bd45e72d
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to