libmicrohttpd

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

commit f26b806199a9ec0eb72fa217f855c9a4cff78983
parent c51718523db385aaeddb137fc92b4d30e64dff33
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Fri, 16 Sep 2022 10:35:37 +0300

digestauth: changed "slot used" detection logic

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

diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c @@ -1465,12 +1465,10 @@ is_slot_available (const struct MHD_NonceNc *const nn, if (0 == nn->nonce[0]) return true; /* The slot is empty */ - if ((0 == memcmp (nn->nonce, new_nonce, new_nonce_len)) && - (0 == nn->nonce[new_nonce_len])) + if (0 == memcmp (nn->nonce, new_nonce, new_nonce_len)) { - /* The slot has the same nonce already, the same nonce was already generated - * and used, this slot cannot be used with the same nonce as it would - * just reset received 'nc' values. */ + /* The slot has the same nonce already. This nonce cannot be registered + * again as it would just clear 'nc' usage history. */ return false; }