fix for check on empty password

pull/520/head
JacobBarthelmeh 2023-05-24 14:53:50 -07:00
parent 94df77ff76
commit f18f9adf1f
1 changed files with 1 additions and 2 deletions

View File

@ -299,8 +299,7 @@ static int CheckPasswordHashUnix(const char* input, char* stored)
}
/* empty password case */
if (WSTRLEN(stored) == 0 && WSTRLEN(input) == 0 &&
WSTRCMP(input, stored) == 0) {
if (stored[0] == 0 && WSTRLEN(input) == 0) {
wolfSSH_Log(WS_LOG_INFO,
"[SSHD] User logged in with empty password");
return ret;