gnunet-svn
[Top][All Lists]
Advanced

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

[taler-challenger] branch master updated: add content-length restriction


From: gnunet
Subject: [taler-challenger] branch master updated: add content-length restrictions
Date: Sat, 06 May 2023 19:58:57 +0200

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

grothoff pushed a commit to branch master
in repository challenger.

The following commit(s) were added to refs/heads/master by this push:
     new d8eecc7  add content-length restrictions
d8eecc7 is described below

commit d8eecc7b0329b7b05df5967b30ed4e525cacdc48
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat May 6 19:58:54 2023 +0200

    add content-length restrictions
---
 src/challenger/challenger-httpd_auth.c      | 5 +++--
 src/challenger/challenger-httpd_challenge.c | 3 ++-
 src/challenger/challenger-httpd_solve.c     | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/challenger/challenger-httpd_auth.c 
b/src/challenger/challenger-httpd_auth.c
index 14a5d80..f14eaf2 100644
--- a/src/challenger/challenger-httpd_auth.c
+++ b/src/challenger/challenger-httpd_auth.c
@@ -194,10 +194,11 @@ CH_handler_auth (struct CH_HandlerContext *hc,
     hc->cc = &cleanup_ctx;
     hc->ctx = bc;
     bc->pp = MHD_create_post_processor (hc->connection,
-                                        1024,
+                                        2 * 1024,
                                         &post_iter,
                                         bc);
-    /* FIXME: check content-length is low-enough */
+    TALER_MHD_check_content_length (hc->connection,
+                                    2 * 1024);
     return MHD_YES;
   }
   /* handle upload */
diff --git a/src/challenger/challenger-httpd_challenge.c 
b/src/challenger/challenger-httpd_challenge.c
index abf76ac..9f8e680 100644
--- a/src/challenger/challenger-httpd_challenge.c
+++ b/src/challenger/challenger-httpd_challenge.c
@@ -404,7 +404,8 @@ CH_handler_challenge (struct CH_HandlerContext *hc,
                                          TALER_EC_GENERIC_PARAMETER_MISSING,
                                          hc->path);
     }
-    /* FIXME: check content-length is low-enough */
+    TALER_MHD_check_content_length (hc->connection,
+                                    1024);
     return MHD_YES;
   }
   GNUNET_assert (GNUNET_YES != bc->suspended);
diff --git a/src/challenger/challenger-httpd_solve.c 
b/src/challenger/challenger-httpd_solve.c
index 0f4c85b..cd42b7d 100644
--- a/src/challenger/challenger-httpd_solve.c
+++ b/src/challenger/challenger-httpd_solve.c
@@ -157,7 +157,8 @@ CH_handler_solve (struct CH_HandlerContext *hc,
                                          TALER_EC_GENERIC_PARAMETER_MISSING,
                                          hc->path);
     }
-    /* FIXME: check content-length is low-enough */
+    TALER_MHD_check_content_length (hc->connection,
+                                    1024);
     return MHD_YES;
   }
   /* handle upload */

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