From 00caba621214ab620b19e7e99cff1952ebed1292 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Thu, 2 Jun 2022 19:19:49 +0300 Subject: [PATCH] Request authorisation: detect possibly valid, but unsupported type --- src/microhttpd/gen_auth.c | 2 +- src/microhttpd/gen_auth.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/microhttpd/gen_auth.c b/src/microhttpd/gen_auth.c index 0246a114..d5353863 100644 --- a/src/microhttpd/gen_auth.c +++ b/src/microhttpd/gen_auth.c @@ -480,7 +480,7 @@ parse_auth_rq_header_ (struct MHD_Connection *c) if (NULL != rq_auth) { memset (rq_auth, 0, sizeof(struct MHD_AuthRqHeader)); - rq_auth->auth_type = MHD_AUTHTYPE_INVALID; + rq_auth->auth_type = MHD_AUTHTYPE_UNKNOWN; } return false; } diff --git a/src/microhttpd/gen_auth.h b/src/microhttpd/gen_auth.h index 6be4eb4d..f6d207e5 100644 --- a/src/microhttpd/gen_auth.h +++ b/src/microhttpd/gen_auth.h @@ -41,7 +41,8 @@ enum MHD_AuthType MHD_AUTHTYPE_NONE = 0,/**< No authorisation */ MHD_AUTHTYPE_BASIC, /**< Basic Authorisation, RFC 7617 */ MHD_AUTHTYPE_DIGEST, /**< Digest Authorisation, RFC 7616 */ - MHD_AUTHTYPE_INVALID /**< Wrong/Unknown/Unsupported authorisation type */ + MHD_AUTHTYPE_UNKNOWN, /**< Unknown/Unsupported authorisation type */ + MHD_AUTHTYPE_INVALID /**< Wrong/broken authorisation header */ }; #ifdef BAUTH_SUPPORT