X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fuser_ops.c;fp=citadel%2Fuser_ops.c;h=c79e87abd04dd40c86e3e23a3c61297aa1ef7bb5;hp=e55807dd33196103c1537c27ed5670d9dbcaf4cf;hb=ab472129567331427686fd2dc4dacf61afe58ff9;hpb=72cf2e7f757fd0d4e977be9154222be3af77b59c diff --git a/citadel/user_ops.c b/citadel/user_ops.c index e55807dd3..c79e87abd 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -567,10 +567,12 @@ int CtdlLoginExistingUser(char *authname, const char *trythisname) /* If a "master user" is defined, handle its authentication if specified */ CC->is_master = 0; - if (strlen(config.c_master_user) > 0) if (strlen(config.c_master_pass) > 0) if (authname) { - if (!strcasecmp(authname, config.c_master_user)) { - CC->is_master = 1; - } + if ((configlen.c_master_user > 0) && + (configlen.c_master_pass > 0) && + (authname != NULL) && + (!strcasecmp(authname, config.c_master_user))) + { + CC->is_master = 1; } /* Continue attempting user validation... */