commit 0568c69f666935fba6c533058097e57fa810d12f
parent f1a373ffb176e79bfe5d495fd3f1341c30fe6292
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Thu, 9 Jul 2026 21:06:28 +0200
handle PP start error properly
Diffstat:
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/challenger/challenger-httpd_solve.c b/src/challenger/challenger-httpd_solve.c
@@ -186,6 +186,15 @@ CH_handler_solve (struct CH_HandlerContext *hc,
1024,
&post_iter,
bc);
+ if (NULL == bc->pp)
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (
+ hc->connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "Content-Type");
+ }
if (GNUNET_OK !=
GNUNET_STRINGS_string_to_data (hc->path,
strlen (hc->path),
diff --git a/src/challenger/challenger-httpd_token.c b/src/challenger/challenger-httpd_token.c
@@ -244,6 +244,16 @@ CH_handler_token (struct CH_HandlerContext *hc,
2 * 1024,
&post_iter,
bc);
+ if (NULL == bc->pp)
+ {
+ GNUNET_break_op (0);
+ return CH_reply_with_oauth_error (
+ hc->connection,
+ MHD_HTTP_BAD_REQUEST,
+ "invalid_request",
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "Content-Type");
+ }
TALER_MHD_check_content_length (hc->connection,
2 * 1024);
return MHD_YES;