gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (dbb1222d -> 56c4b4ae)


From: gnunet
Subject: [libmicrohttpd] branch master updated (dbb1222d -> 56c4b4ae)
Date: Sun, 05 Jun 2022 13:28:34 +0200

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from dbb1222d gen_auth: do not allow semicolon for diget auth unless it is 
in a quoted string
     new 7f4634cc mhd_str: fixed typo in doxy
     new 56c4b4ae test_auth_parse: added more checks with unclose quotation for 
digest auth

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/microhttpd/mhd_str.h         |  2 +-
 src/microhttpd/test_auth_parse.c | 66 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h
index d86e0dc7..8279afd1 100644
--- a/src/microhttpd/mhd_str.h
+++ b/src/microhttpd/mhd_str.h
@@ -481,7 +481,7 @@ MHD_bin_to_hex (const void *bin,
  *
  * @param quoted the quoted string, must NOT include leading and closing
  *               DQUOTE chars, does not need to be zero-terminated
- * @param size the size in chars of the @a quited string
+ * @param quoted_len the length in chars of the @a quoted string
  * @param[out] result the pointer to the buffer to put the result, must
  *                    be at least @a size character long. The result is NOT
  *                    zero-terminated.
diff --git a/src/microhttpd/test_auth_parse.c b/src/microhttpd/test_auth_parse.c
index 6acd251e..df1957c1 100644
--- a/src/microhttpd/test_auth_parse.c
+++ b/src/microhttpd/test_auth_parse.c
@@ -611,6 +611,72 @@ check_type (void)
   r += expect_result_type (1, "Digest foo=bar,=", 
EXPECT_TYPE_FOR_DIGEST_INVLD);
   r += expect_result_type (1, "Digest foo=bar, =", \
                            EXPECT_TYPE_FOR_DIGEST_INVLD);
+  /* Unclosed quotation */
+  r += expect_result_type (1, "Digest nc=\"", EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"abc", EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"   ", EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"abc   ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"   abc", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"   abc", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"\\", EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"\\\"", 
EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"  \\\"", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"\\\"  ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"  \\\"  ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc=\"\\\"\\\"\\\"\\\"", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"", EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"abc", 
EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"   ", 
EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"abc   ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"   abc", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"   abc", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"\\", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"\\\"", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"  \\\"", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"\\\"  ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"  \\\"  ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest nc= \"\\\"\\\"\\\"\\\"", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"", EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"bar", 
EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"   ", 
EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"bar   ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"   bar", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"   bar", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo= \"   bar", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\",   bar", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"   bar,", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"\\\"", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"  \\\"", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"\\\"  ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"  \\\"  ", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
+  r += expect_result_type (1, "Digest foo=\"\\\"\\\"\\\"\\\"", \
+                           EXPECT_TYPE_FOR_DIGEST_INVLD);
   /* Full set of parameters with semicolon inside */
   r += expect_result_type (1, "Digest username=\"test@example.com\", " \
                            "realm=\"users@example.com\", 
nonce=\"32141232413abcde\", " \

-- 
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]