From 626b446e0a4f10fbcf38661013a592bcd3193e08 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 2 Dec 2005 12:30:03 +0100 Subject: The Jabber module now only accepts a limited range of ports (5222 and 5223), so it can't be abused as a portscanner. Thanks to Peter van Dijk (Habbie) for the report. --- protocols/jabber/jabber.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'protocols') diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 16755d99..e7703b44 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -589,6 +589,11 @@ static void gjab_start(gjconn gjc) port = DEFAULT_PORT; else if (port == -1 && ssl) port = DEFAULT_PORT_SSL; + else if (port != 5222 && port != 5223) { + serv_got_crap(GJ_GC(gjc), "Only port numbers 5222 and 5223 are allowed for Jabber connections."); + STATE_EVT(JCONN_STATE_OFF) + return; + } if (server == NULL) server = g_strdup(gjc->user->server); -- cgit v1.2.3