[srvx-commits] CVS: services/src nickserv.c,1.254,1.255
Brought to you by:
entrope
From: Entrope <en...@us...> - 2003-08-11 21:01:51
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv22467/src Modified Files: nickserv.c Log Message: properly mangle argv for commands that accept passwords (fixes bug #786968) Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.254 retrieving revision 1.255 diff -C2 -r1.254 -r1.255 *** nickserv.c 7 Aug 2003 12:52:10 -0000 1.254 --- nickserv.c 11 Aug 2003 20:51:12 -0000 1.255 *************** *** 826,829 **** --- 826,831 ---- /* Stamp users with their account name. */ char *id = hi->handle; + #else + const char *id = "???"; #endif if (!nickserv_conf.disable_nicks) { *************** *** 1080,1083 **** --- 1082,1086 ---- password = argv[2]; + argv[2] = "****"; if ((hi = nickserv_register(user, user, argv[1], password, no_auth))) { /* Add any masks they should get. */ *************** *** 1762,1773 **** old_pass = argv[1]; new_pass = argv[2]; ! argv[1] = "*OLDPASS*"; ! argv[2] = "*NEWPASS*"; if (!is_secure_password(hi->handle, new_pass, user)) return 0; if (!checkpass(old_pass, hi->passwd)) { nickserv_notice(user, NSMSG_PASSWORD_INVALID); return 0; } cryptpass(new_pass, hi->passwd); nickserv_notice(user, NSMSG_PASS_SUCCESS); return 1; --- 1765,1777 ---- old_pass = argv[1]; new_pass = argv[2]; ! argv[2] = "****"; if (!is_secure_password(hi->handle, new_pass, user)) return 0; if (!checkpass(old_pass, hi->passwd)) { + argv[1] = "BADPASS"; nickserv_notice(user, NSMSG_PASSWORD_INVALID); return 0; } cryptpass(new_pass, hi->passwd); + argv[1] = "****"; nickserv_notice(user, NSMSG_PASS_SUCCESS); return 1; |