gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 01/05: gen_auth: treat empty header as invalid


From: gnunet
Subject: [libmicrohttpd] 01/05: gen_auth: treat empty header as invalid
Date: Sun, 05 Jun 2022 12:07:59 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit b00a58cfa72085c5e9353aa3b5ecfeba43984fce
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Jun 3 15:59:40 2022 +0300

    gen_auth: treat empty header as invalid
---
 src/microhttpd/gen_auth.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/microhttpd/gen_auth.c b/src/microhttpd/gen_auth.c
index d5353863..b0a8f295 100644
--- a/src/microhttpd/gen_auth.c
+++ b/src/microhttpd/gen_auth.c
@@ -371,6 +371,20 @@ parse_auth_rq_header_ (struct MHD_Connection *c)
   h += i;
   h_len -= i;
 
+  if (0 == h_len)
+  { /* The header is an empty string */
+    rq_auth = (struct MHD_AuthRqHeader *)
+              MHD_connection_alloc_memory_ (c,
+                                            sizeof (struct MHD_AuthRqHeader));
+    c->rq_auth = rq_auth;
+    if (NULL != rq_auth)
+    {
+      memset (rq_auth, 0, sizeof(struct MHD_AuthRqHeader));
+      rq_auth->auth_type = MHD_AUTHTYPE_INVALID;
+    }
+    return false;
+  }
+
 #ifdef DAUTH_SUPPORT
   if (1)
   {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]