libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 8c901963d7838497cc49e8f66aae48e8f7e33bff
parent a9adbf77b996fb7fda34b25f513f81d23544f27c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 31 Jan 2022 14:19:33 +0300

digestauth: reject invalid 'nc' value

Diffstat:
Msrc/microhttpd/digestauth.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c @@ -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