]> code.citadel.org Git - citadel.git/blobdiff - citadel/user_ops.c
* Reject empty username for login attempts
[citadel.git] / citadel / user_ops.c
index 49c0c10f1dde1b0e9429d2cf9ec28ea9dd374e23..39cd139de031473a197525ee1b8b25169a18f7a0 100644 (file)
@@ -355,6 +355,10 @@ int CtdlLoginExistingUser(char *trythisname)
        safestrncpy(username, trythisname, USERNAME_SIZE);
        striplt(username);
 
+       if (strlen(username) == 0) {
+               return login_not_found;
+       }
+
 #ifdef ENABLE_AUTOLOGIN
 
        /* If this is an autologin build, the only valid auth source is the