From 8a2da6d6a3b7ab04b3bd0506d0f245997bb49b52 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Sun, 5 Jun 2022 12:24:34 +0300 Subject: [PATCH] gen_auth: do not allow the equal sign alone for digest auth --- src/microhttpd/gen_auth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/microhttpd/gen_auth.c b/src/microhttpd/gen_auth.c index 04894d9a..2cab478b 100644 --- a/src/microhttpd/gen_auth.c +++ b/src/microhttpd/gen_auth.c @@ -175,6 +175,8 @@ parse_dauth_params (const char *str, mhd_assert ('\t' != str[i]); left = str_len - i; + if ('=' == str[i]) + return false; /* The equal sign is not allowed as the first character */ for (p = 0; p < sizeof(map) / sizeof(map[0]); p++) { struct dauth_token_param *const aparam = map + p;