From 02f126c36e3460fecd23429f45f203f9a935b92c Mon Sep 17 00:00:00 2001 From: "viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sat, 20 Sep 2008 14:45:38 +0000 Subject: BUILD : 1.7.22 (1446) BUGS : NOTES : Removed password truncating and fixed a crashbug in enc_none. This build still crashes on CS GETPASS on some systems though. Someone take a look at termination of ci->founderpass pls. git-svn-id: svn://svn.anope.org/anope/trunk@1446 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1160 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/cs_set.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core/cs_set.c') diff --git a/src/core/cs_set.c b/src/core/cs_set.c index 24a749662..9225f434f 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -373,10 +373,9 @@ int do_set_password(User * u, ChannelInfo * ci, char *param) return MOD_CONT; } - if (len > PASSMAX) { - len = PASSMAX; - param[len] = 0; - notice_lang(s_ChanServ, u, PASSWORD_TRUNCATED, PASSMAX); + if (enc_encrypt_check_len(len ,PASSMAX)) { + notice_lang(s_ChanServ, u, PASSWORD_TOO_LONG); + return MOD_CONT; } if (enc_encrypt(param, len, ci->founderpass, PASSMAX) < 0) { -- cgit