summaryrefslogtreecommitdiff
path: root/src/core/ns_set.c
diff options
context:
space:
mode:
authorviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-20 14:45:38 +0000
committerviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-20 14:45:38 +0000
commit02f126c36e3460fecd23429f45f203f9a935b92c (patch)
tree78b7f2f5617356d10aded29d79fa227b2c81e05e /src/core/ns_set.c
parent4f3f2b2cd4ed0b1f0dac5e86026d4612ab4616c6 (diff)
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
Diffstat (limited to 'src/core/ns_set.c')
-rw-r--r--src/core/ns_set.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/ns_set.c b/src/core/ns_set.c
index 54f381dd1..00c712e34 100644
--- a/src/core/ns_set.c
+++ b/src/core/ns_set.c
@@ -208,12 +208,9 @@ int do_set_password(User * u, NickCore * nc, char *param)
if (stricmp(nc->display, param) == 0 || (StrictPasswords && len < 5)) {
notice_lang(s_NickServ, u, MORE_OBSCURE_PASSWORD);
return MOD_CONT;
- }
-
- if (len > PASSMAX) {
- len = PASSMAX;
- param[len] = 0;
- notice_lang(s_NickServ, u, PASSWORD_TRUNCATED, PASSMAX);
+ } else if (enc_encrypt_check_len(len ,PASSMAX)) {
+ notice_lang(s_NickServ, u, PASSWORD_TOO_LONG);
+ return MOD_CONT;
}
if (nc->pass)
@@ -232,7 +229,7 @@ int do_set_password(User * u, NickCore * nc, char *param)
memset(param, 0, len);
if(enc_decrypt(nc->pass,tmp_pass,PASSMAX)==1) {
- notice_lang(s_NickServ, u, NICK_SET_PASSWORD_CHANGED_TO, nc->pass);
+ notice_lang(s_NickServ, u, NICK_SET_PASSWORD_CHANGED_TO, tmp_pass);
} else {
notice_lang(s_NickServ, u, NICK_SET_PASSWORD_CHANGED);
}