commit 56df03924cdb1a00f90dd6ee52ec0e0596fcf7c0
parent 415e069d31c46d320d94e7719404bb28459bef1b
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Wed, 13 May 2026 07:49:30 +0200
fix #11394
Diffstat:
3 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/src/exchange/taler-exchange-httpd_post-kyc-upload-ID.c b/src/exchange/taler-exchange-httpd_post-kyc-upload-ID.c
@@ -403,6 +403,24 @@ transact (void *cls,
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
break;
}
+ {
+ const char *form_id
+ = json_string_value (json_object_get (uc->result,
+ "FORM_ID"));
+ if (0 !=
+ strcmp (form_id,
+ form_name))
+ {
+ GNUNET_break_op (0);
+ *mhd_ret = TALER_MHD_reply_with_error (
+ rc->connection,
+ MHD_HTTP_CONFLICT,
+ TALER_EC_EXCHANGE_KYC_INVALID_FORM_SUBMITTED,
+ "FORM_ID");
+ GNUNET_free (form_name);
+ return GNUNET_DB_STATUS_HARD_ERROR;
+ }
+ }
qs = TEH_kyc_store_attributes (
uc->legi_process_row,
&uc->h_payto,
diff --git a/src/include/taler/taler_error_codes.h b/src/include/taler/taler_error_codes.h
@@ -2112,6 +2112,14 @@ enum TALER_ErrorCode
/**
+ * The client submitted the wrong form for the request. This is some invalid use of the API. Please contact technical support.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_EXCHANGE_KYC_INVALID_FORM_SUBMITTED = 1917,
+
+
+ /**
* The exchange tried to run an AML program, but that program did not terminate on time. Contact the exchange operator to address the AML program bug or performance issue. If it is not a performance issue, the timeout might have to be increased (requires changes to the source code).
* Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
* (A value of 0 indicates that the error is generated client-side).
diff --git a/src/util/taler_error_codes.c b/src/util/taler_error_codes.c
@@ -2036,6 +2036,14 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ /* 1917 */
+ .ec = TALER_EC_EXCHANGE_KYC_INVALID_FORM_SUBMITTED,
+ .hint =
+ "The client submitted the wrong form for the request. This is some invalid use of the API. Please contact technical support.",
+ .http_code = MHD_HTTP_CONFLICT
+ },
+
+ {
/* 1918 */
.ec = TALER_EC_EXCHANGE_KYC_GENERIC_AML_PROGRAM_TIMEOUT,
.hint =
@@ -5674,7 +5682,7 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
/**
* The length of @e code_hint_pairs.
*/
-static const unsigned int code_hint_pairs_length = 733;
+static const unsigned int code_hint_pairs_length = 734;
const char *