From cee75ea2bf528d7d465cfa224128228926287446 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 7 Jan 2012 16:32:50 +0000 Subject: [PATCH] fix nonce counter base - #2061 --- ChangeLog | 4 ++++ src/daemon/digestauth.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 39d3e70e..9bc39925 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Jan 7 17:30:48 CET 2012 + Digest authentication expects nonce count in base 16, not base 10 + (#2061). -tclaveirole + Thu Jan 5 22:01:37 CET 2012 Partial fix for #2059, digest authentication with GET arguments. -CG diff --git a/src/daemon/digestauth.c b/src/daemon/digestauth.c index ca23925e..472811e8 100644 --- a/src/daemon/digestauth.c +++ b/src/daemon/digestauth.c @@ -551,7 +551,7 @@ MHD_digest_auth_check(struct MHD_Connection *connection, (0 == lookup_sub_value(nc, sizeof (nc), header, "nc")) || (0 == lookup_sub_value(response, sizeof (response), header, "response")) ) return MHD_NO; - nci = strtoul (nc, &end, 10); + nci = strtoul (nc, &end, 16); if ( ('\0' != *end) || ( (LONG_MAX == nci) && (errno == ERANGE) ) ) return MHD_NO; /* invalid nonce */