From cf6965e9e2b1b362e895ce9a35f8897cdff91a31 Mon Sep 17 00:00:00 2001 From: stskeeps Date: Tue, 24 Apr 2007 11:36:33 +0000 Subject: [PATCH] - #0003223 reported by JasonTik patched by WolfSage, regarding undocumented max link pass length. This now -WARNS- when there is a password bigger than PASSWDLEN. --- Changes | 3 +++ src/s_conf.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Changes b/Changes index 9ced3fbcc..4a11e12d2 100644 --- a/Changes +++ b/Changes @@ -1615,3 +1615,6 @@ MOTDs - Implemented #0002990, changing 432 into: /* 432 ERR_ERRONEUSNICKNAME */ ":%s 432 %s %s :%s", - #0002301 reported by vonitsanet patched by WolfSage, regarding adding oper username to /whois, visible if you are an oper +- #0003223 reported by JasonTik patched by WolfSage, regarding undocumented + max link pass length. This now -WARNS- when there is a password bigger + than PASSWDLEN. diff --git a/src/s_conf.c b/src/s_conf.c index 7b437e58e..0e6e98072 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -5941,6 +5941,12 @@ int _test_link(ConfigFile *conf, ConfigEntry *ce) continue; } has_passwordreceive = 1; + if (strlen(cep->ce_vardata) > PASSWDLEN) + { + config_warn("%s:%i: link::password-receive cannot exceed %d characters in length", + ce->ce_fileptr->cf_filename, ce->ce_varlinenum, PASSWDLEN); + errors++; + } if (Auth_CheckError(cep) < 0) errors++; } @@ -5959,6 +5965,12 @@ int _test_link(ConfigFile *conf, ConfigEntry *ce) ce->ce_fileptr->cf_filename, ce->ce_varlinenum); errors++; } + if (strlen(cep->ce_vardata) > PASSWDLEN) + { + config_warn("%s:%i: link::password-connect cannot exceed %d characters in length", + ce->ce_fileptr->cf_filename, ce->ce_varlinenum, PASSWDLEN); + errors++; + } } else if (!strcmp(cep->ce_varname, "class")) {