Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 98419e8f authored by rswindell's avatar rswindell

The password is no longer checked against the user's current password when...

The password is no longer checked against the user's current password when changing from the user defaults menu.
parent ee41f07b
......@@ -246,7 +246,7 @@ bool sbbs_t::logon()
bputs(text[NewPassword]);
getstr(str,LEN_PASS,K_UPPER|K_LINE);
truncsp(str);
if(chkpass(str,&useron))
if(chkpass(str,&useron,true))
break;
CRLF; }
......
......@@ -311,7 +311,7 @@ void sbbs_t::newuser()
bputs(text[NewPassword]);
getstr(str,LEN_PASS,K_UPPER|K_LINE);
truncsp(str);
if(chkpass(str,&useron)) {
if(chkpass(str,&useron,true)) {
strcpy(useron.pass,str);
CRLF;
bprintf(text[YourPasswordIs],useron.pass);
......
......@@ -363,7 +363,7 @@ public:
void printnodedat(uint number, node_t* node);
void reports(void);
bool inputnstime(time_t *dt);
bool chkpass(char *pass, user_t* user);
bool chkpass(char *pass, user_t* user, bool unique);
char * cmdstr(char *instr, char *fpath, char *fspec, char *outstr);
char cmdstr_output[512];
......
......@@ -594,7 +594,7 @@ bool sbbs_t::inputnstime(time_t *dt)
/*****************************************************************************/
/* Checks a password for uniqueness and validity */
/*****************************************************************************/
bool sbbs_t::chkpass(char *pass, user_t* user)
bool sbbs_t::chkpass(char *pass, user_t* user, bool unique)
{
char c,d,first[128],last[128],sysop[41],sysname[41],*p;
char alias[LEN_ALIAS+1], name[LEN_NAME+1], handle[LEN_HANDLE+1];
......@@ -641,7 +641,7 @@ bool sbbs_t::chkpass(char *pass, user_t* user)
strupr(sysop);
strcpy(sysname,cfg.sys_name);
strupr(sysname);
if((user->pass[0]
if((unique && user->pass[0]
&& (strstr(pass,user->pass) || strstr(user->pass,pass)))
|| (name[0]
&& (strstr(pass,name) || strstr(name,pass)))
......
......@@ -950,7 +950,7 @@ void sbbs_t::maindflts(user_t* user)
if(!getstr(str,LEN_PASS,K_UPPER|K_LINE))
break;
truncsp(str);
if(!chkpass(str,user)) {
if(!chkpass(str,user,false)) {
CRLF;
pause();
break; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment