commit d8eecc7b0329b7b05df5967b30ed4e525cacdc48
parent 79b95dc36829e5e99a9bd30082eb1f7836bd059f
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 6 May 2023 19:58:54 +0200
add content-length restrictions
Diffstat:
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git 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
@@ -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
@@ -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 */