aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/digestauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/digestauth.c')
-rw-r--r--src/microhttpd/digestauth.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index a1b7bcf4..e0a26b30 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -1326,11 +1326,12 @@ MHD_digest_auth_check_digest (struct MHD_Connection *connection,
1326 * @param opaque string to user for opaque value 1326 * @param opaque string to user for opaque value
1327 * @param response reply to send; should contain the "access denied" 1327 * @param response reply to send; should contain the "access denied"
1328 * body; note that this function will set the "WWW Authenticate" 1328 * body; note that this function will set the "WWW Authenticate"
1329 * header and that the caller should not do this 1329 * header and that the caller should not do this; the NULL is tolerated
1330 * @param signal_stale #MHD_YES if the nonce is invalid to add 1330 * @param signal_stale #MHD_YES if the nonce is invalid to add
1331 * 'stale=true' to the authentication header 1331 * 'stale=true' to the authentication header
1332 * @param algo digest algorithm to use 1332 * @param algo digest algorithm to use
1333 * @return #MHD_YES on success, #MHD_NO otherwise 1333 * @return #MHD_YES on success, #MHD_NO otherwise
1334 * @note Available since #MHD_VERSION 0x00096200
1334 * @ingroup authentication 1335 * @ingroup authentication
1335 */ 1336 */
1336enum MHD_Result 1337enum MHD_Result
@@ -1345,6 +1346,10 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
1345 int hlen; 1346 int hlen;
1346 SETUP_DA (algo, da); 1347 SETUP_DA (algo, da);
1347 1348
1349 if (NULL == response)
1350 return MHD_NO;
1351
1352 if (1)
1348 { 1353 {
1349 char nonce[NONCE_STD_LEN (VLA_ARRAY_LEN_DIGEST (da.digest_size)) + 1]; 1354 char nonce[NONCE_STD_LEN (VLA_ARRAY_LEN_DIGEST (da.digest_size)) + 1];
1350 1355