Request authorisation: detect possibly valid, but unsupported type

This commit is contained in:
Evgeny Grin (Karlson2k)
2022-06-05 12:48:30 +03:00
parent 6ab9cb0c8a
commit 00caba6212
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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;
}
+2 -1
View File
@@ -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