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.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index d4e23fef..c66bcadf 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -862,6 +862,7 @@ digest_auth_check_all (struct MHD_Connection *connection,
862 uint32_t t; 862 uint32_t t;
863 size_t left; /* number of characters left in 'header' for 'uri' */ 863 size_t left; /* number of characters left in 'header' for 'uri' */
864 uint64_t nci; 864 uint64_t nci;
865 char *qmark;
865 866
866 VLA_CHECK_LEN_DIGEST(da->digest_size); 867 VLA_CHECK_LEN_DIGEST(da->digest_size);
867 header = MHD_lookup_connection_value (connection, 868 header = MHD_lookup_connection_value (connection,
@@ -1072,15 +1073,17 @@ digest_auth_check_all (struct MHD_Connection *connection,
1072 uri, 1073 uri,
1073 hentity, 1074 hentity,
1074 da); 1075 da);
1075 1076 qmark = strchr (uri,
1077 '?');
1078 if (NULL != qmark)
1079 *qmark = '\0';
1076 1080
1077 /* Need to unescape URI before comparing with connection->url */ 1081 /* Need to unescape URI before comparing with connection->url */
1078 daemon->unescape_callback (daemon->unescape_callback_cls, 1082 daemon->unescape_callback (daemon->unescape_callback_cls,
1079 connection, 1083 connection,
1080 uri); 1084 uri);
1081 if (0 != strncmp (uri, 1085 if (0 != strcmp (uri,
1082 connection->url, 1086 connection->url))
1083 strlen (connection->url)))
1084 { 1087 {
1085#ifdef HAVE_MESSAGES 1088#ifdef HAVE_MESSAGES
1086 MHD_DLOG (daemon, 1089 MHD_DLOG (daemon,
@@ -1091,8 +1094,7 @@ digest_auth_check_all (struct MHD_Connection *connection,
1091 } 1094 }
1092 1095
1093 { 1096 {
1094 const char *args = strchr (uri, 1097 const char *args = qmark;
1095 '?');
1096 1098
1097 if (NULL == args) 1099 if (NULL == args)
1098 args = ""; 1100 args = "";