mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
fix algorithm parsing, string cmp was matching wrong strings to client requests to determine selected algorithm
This commit is contained in:
@@ -290,15 +290,14 @@ get_rq_dauth_algo (const struct MHD_RqDAuthParam *const algo_param)
|
||||
return MHD_DIGEST_AUTH_ALGO3_SHA256;
|
||||
if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \
|
||||
algo_param->value.len, \
|
||||
_MHD_MD5_TOKEN _MHD_SESS_TOKEN))
|
||||
_MHD_SHA512_256_TOKEN))
|
||||
return MHD_DIGEST_AUTH_ALGO3_SHA512_256;
|
||||
|
||||
/* Algorithms below are not supported by MHD for authentication */
|
||||
|
||||
if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \
|
||||
algo_param->value.len, \
|
||||
_MHD_SHA512_256_TOKEN \
|
||||
_MHD_SESS_TOKEN))
|
||||
|
||||
/* Algorithms below are not supported by MHD for authentication */
|
||||
|
||||
_MHD_MD5_TOKEN _MHD_SESS_TOKEN))
|
||||
return MHD_DIGEST_AUTH_ALGO3_MD5_SESSION;
|
||||
if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \
|
||||
algo_param->value.len, \
|
||||
@@ -307,7 +306,8 @@ get_rq_dauth_algo (const struct MHD_RqDAuthParam *const algo_param)
|
||||
return MHD_DIGEST_AUTH_ALGO3_SHA256_SESSION;
|
||||
if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \
|
||||
algo_param->value.len, \
|
||||
_MHD_SHA512_256_TOKEN))
|
||||
_MHD_SHA512_256_TOKEN \
|
||||
_MHD_SESS_TOKEN))
|
||||
return MHD_DIGEST_AUTH_ALGO3_SHA512_256_SESSION;
|
||||
|
||||
/* No known algorithm has been detected */
|
||||
|
||||
Reference in New Issue
Block a user