diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2005-12-02 12:43:47 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2005-12-02 12:43:47 +0100 |
commit | 027d2ebf750a011bf544f7d279cfb706594e5d05 (patch) | |
tree | e5e3770b1bd50480320c7a7d55cdda41fb8fdc6c /protocols/jabber/jabber.c | |
parent | 626b446e0a4f10fbcf38661013a592bcd3193e08 (diff) |
Modified CHANGES, and extended the allowed port range a bit.
Diffstat (limited to 'protocols/jabber/jabber.c')
-rw-r--r-- | protocols/jabber/jabber.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index e7703b44..535607e6 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -54,6 +54,8 @@ #define DEFAULT_GROUPCHAT "conference.jabber.org" #define DEFAULT_PORT 5222 #define DEFAULT_PORT_SSL 5223 +#define JABBER_PORT_MIN 5220 +#define JABBER_PORT_MAX 5229 #define JABBER_GROUP "Friends" @@ -589,8 +591,8 @@ 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."); + else if (port < JABBER_PORT_MIN || port > JABBER_PORT_MAX) { + serv_got_crap(GJ_GC(gjc), "For security reasons, the Jabber port number must be in the %d-%d range.", JABBER_PORT_MIN, JABBER_PORT_MAX); STATE_EVT(JCONN_STATE_OFF) return; } |