diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-02 19:19:49 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-05 12:48:30 +0300 |
commit | 00caba621214ab620b19e7e99cff1952ebed1292 (patch) | |
tree | 7919504a8e88b6a44980168ed2f9bfe6c13ea622 | |
parent | 6ab9cb0c8a90fbb15b5dfbb51a83c44bb6d42ea6 (diff) | |
download | libmicrohttpd-00caba621214ab620b19e7e99cff1952ebed1292.tar.gz libmicrohttpd-00caba621214ab620b19e7e99cff1952ebed1292.zip |
Request authorisation: detect possibly valid, but unsupported type
-rw-r--r-- | src/microhttpd/gen_auth.c | 2 | ||||
-rw-r--r-- | 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) | |||
480 | if (NULL != rq_auth) | 480 | if (NULL != rq_auth) |
481 | { | 481 | { |
482 | memset (rq_auth, 0, sizeof(struct MHD_AuthRqHeader)); | 482 | memset (rq_auth, 0, sizeof(struct MHD_AuthRqHeader)); |
483 | rq_auth->auth_type = MHD_AUTHTYPE_INVALID; | 483 | rq_auth->auth_type = MHD_AUTHTYPE_UNKNOWN; |
484 | } | 484 | } |
485 | return false; | 485 | return false; |
486 | } | 486 | } |
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 | |||
41 | MHD_AUTHTYPE_NONE = 0,/**< No authorisation */ | 41 | MHD_AUTHTYPE_NONE = 0,/**< No authorisation */ |
42 | MHD_AUTHTYPE_BASIC, /**< Basic Authorisation, RFC 7617 */ | 42 | MHD_AUTHTYPE_BASIC, /**< Basic Authorisation, RFC 7617 */ |
43 | MHD_AUTHTYPE_DIGEST, /**< Digest Authorisation, RFC 7616 */ | 43 | MHD_AUTHTYPE_DIGEST, /**< Digest Authorisation, RFC 7616 */ |
44 | MHD_AUTHTYPE_INVALID /**< Wrong/Unknown/Unsupported authorisation type */ | 44 | MHD_AUTHTYPE_UNKNOWN, /**< Unknown/Unsupported authorisation type */ |
45 | MHD_AUTHTYPE_INVALID /**< Wrong/broken authorisation header */ | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | #ifdef BAUTH_SUPPORT | 48 | #ifdef BAUTH_SUPPORT |