X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fuser_ops.c;h=c29a5613b1561fc84be89bf64dcb8c0c23ce3d49;hb=1c4cf61f583b0bd5d76923631112af1e00da49c1;hp=2ca3b4220ddfb43c754da98643c37ccbbeacc047;hpb=17479fc9eaf4df4a353cf79e0a36fb25def5fcdf;p=citadel.git diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 2ca3b4220..c29a5613b 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -945,7 +945,6 @@ int CtdlTryPassword(const char *password, long len) CONM_syslog(LOG_INFO, "CtdlTryPassword: NULL password string supplied\n"); return pass_wrong_password; } - code = (-1); if (CCC->is_master) { code = strcmp(password, config.c_master_pass); @@ -1004,9 +1003,11 @@ int CtdlTryPassword(const char *password, long len) strproc(pw); strproc(CCC->user.password); code = strcasecmp(CCC->user.password, pw); - strproc(pw); - strproc(CCC->user.password); - code = strcasecmp(CCC->user.password, pw); + if (code != 0) { + strproc(pw); + strproc(CCC->user.password); + code = strcasecmp(CCC->user.password, pw); + } free (pw); }