commit 00caba621214ab620b19e7e99cff1952ebed1292
parent 6ab9cb0c8a90fbb15b5dfbb51a83c44bb6d42ea6
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Thu, 2 Jun 2022 19:19:49 +0300
Request authorisation: detect possibly valid, but unsupported type
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git 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
@@ -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