aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/digestauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/digestauth.c')
-rw-r--r--src/microhttpd/digestauth.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index cc6cd0ac..0a892e22 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -780,7 +780,7 @@ get_rq_extended_uname_copy_z (const char *uname_ext, size_t uname_ext_len,
780 * Get copy of username used by the client. 780 * Get copy of username used by the client.
781 * @param params the Digest Authorization parameters 781 * @param params the Digest Authorization parameters
782 * @param uname_type the type of username 782 * @param uname_type the type of username
783 * @param[out] unames the pointer to the structure to be filled 783 * @param[out] uname_info the pointer to the structure to be filled
784 * @param buf the buffer to be used for usernames 784 * @param buf the buffer to be used for usernames
785 * @param buf_size the size of the @a buf 785 * @param buf_size the size of the @a buf
786 * @return the size of the @a buf used by pointers in @a unames structure 786 * @return the size of the @a buf used by pointers in @a unames structure
@@ -975,17 +975,11 @@ MHD_digest_auth_get_request_info3 (struct MHD_Connection *connection)
975 975
976 if ( (MHD_DIGEST_AUTH_UNAME_TYPE_MISSING != uname_type) && 976 if ( (MHD_DIGEST_AUTH_UNAME_TYPE_MISSING != uname_type) &&
977 (MHD_DIGEST_AUTH_UNAME_TYPE_INVALID != uname_type) ) 977 (MHD_DIGEST_AUTH_UNAME_TYPE_INVALID != uname_type) )
978 { 978 unif_buf_used +=
979 struct MHD_DigestAuthUsernameInfo uname_strct; 979 get_rq_uname (params, uname_type,
980 memset (&uname_strct, 0, sizeof(uname_strct)); 980 (struct MHD_DigestAuthUsernameInfo *) info,
981 unif_buf_used += get_rq_uname (params, uname_type, &uname_strct, 981 unif_buf_ptr + unif_buf_used,
982 unif_buf_ptr + unif_buf_used, 982 unif_buf_size - unif_buf_used);
983 unif_buf_size - unif_buf_used);
984 info->uname_type = uname_strct.uname_type;
985 info->username = uname_strct.username;
986 info->username_len = uname_strct.username_len;
987 info->userhash_bin = uname_strct.userhash_bin;
988 }
989 else 983 else
990 info->uname_type = uname_type; 984 info->uname_type = uname_type;
991 985
@@ -1072,6 +1066,7 @@ MHD_digest_auth_get_username3 (struct MHD_Connection *connection)
1072 return NULL; 1066 return NULL;
1073 } 1067 }
1074 mhd_assert (uname_type == uname_info->uname_type); 1068 mhd_assert (uname_type == uname_info->uname_type);
1069 uname_info->algo3 = params->algo3;
1075 1070
1076 return uname_info; 1071 return uname_info;
1077} 1072}