From a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sun, 22 Dec 2019 04:10:53 +0100 Subject: Properly check Jids everywhere --- xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala') diff --git a/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala b/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala index 1890aac3..a1be00d4 100644 --- a/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala +++ b/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala @@ -52,7 +52,11 @@ public class Module : XmppStreamModule, Iq.Handler { } string? host = stream_host.get_attribute("host"); string? jid_str = stream_host.get_attribute("jid"); - Jid? jid = jid_str != null ? Jid.parse(jid_str) : null; + Jid? jid = null; + try { + jid = jid_str != null ? new Jid(jid_str) : null; + } catch (InvalidJidError ignored) { + } int port = stream_host.get_attribute_int("port"); if (host == null || jid == null || port <= 0 || port > 65535) { return; -- cgit v1.2.3-54-g00ecf