diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-17 20:14:58 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-22 20:58:44 +0300 |
commit | 1efb758b79f36e248dfcef68517e9b4ca482b1b7 (patch) | |
tree | c12b1e0e766dbcf580e1f028e4de06411c7d47c3 | |
parent | c4246b5251bb8ee45ca66b4d24597fa26762d729 (diff) | |
download | libmicrohttpd-1efb758b79f36e248dfcef68517e9b4ca482b1b7.tar.gz libmicrohttpd-1efb758b79f36e248dfcef68517e9b4ca482b1b7.zip |
Fixed check for URL match to handle URLs with binary zero
-rw-r--r-- | src/microhttpd/digestauth.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c index f4eecd03..ca66bff0 100644 --- a/src/microhttpd/digestauth.c +++ b/src/microhttpd/digestauth.c | |||
@@ -1801,11 +1801,11 @@ digest_auth_check_all_inner (struct MHD_Connection *connection, | |||
1801 | *qmark = '\0'; | 1801 | *qmark = '\0'; |
1802 | 1802 | ||
1803 | /* Need to unescape URI before comparing with connection->url */ | 1803 | /* Need to unescape URI before comparing with connection->url */ |
1804 | daemon->unescape_callback (daemon->unescape_callback_cls, | 1804 | uri_len = daemon->unescape_callback (daemon->unescape_callback_cls, |
1805 | connection, | 1805 | connection, |
1806 | uri); | 1806 | uri); |
1807 | if (0 != strcmp (uri, | 1807 | if ((uri_len != connection->url_len) || |
1808 | connection->url)) | 1808 | (0 != memcmp (uri, connection->url, uri_len))) |
1809 | { | 1809 | { |
1810 | #ifdef HAVE_MESSAGES | 1810 | #ifdef HAVE_MESSAGES |
1811 | MHD_DLOG (daemon, | 1811 | MHD_DLOG (daemon, |