digestauth: reject invalid 'nc' value

This commit is contained in:
Evgeny Grin (Karlson2k)
2022-01-31 14:19:33 +03:00
parent a9adbf77b9
commit 8c901963d7
+8
View File
@@ -1010,6 +1010,14 @@ digest_auth_check_all (struct MHD_Connection *connection,
#endif
return MHD_NO; /* invalid nonce format */
}
if (0 == nci)
{
#ifdef HAVE_MESSAGES
MHD_DLOG (daemon,
_ ("Authentication failed, invalid 'nc' value.\n"));
#endif
return MHD_NO; /* invalid nc value */
}
/*
* Checking if that combination of nonce and nc is sound