gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 02/02: test_auth_parse: added more checks with unclose q


From: gnunet
Subject: [libmicrohttpd] 02/02: test_auth_parse: added more checks with unclose quotation for digest auth
Date: Sun, 05 Jun 2022 13:28:36 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 56c4b4ae9caaab7cb64954154cc9996fde4e92c8
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Jun 5 14:28:21 2022 +0300

    test_auth_parse: added more checks with unclose quotation for digest auth
---
 src/microhttpd/test_auth_parse.c | 66 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

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]