exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 0b8554ee97d017ace1a4bf6bdf37c434dcf6ef65
parent 41f743d574c938b1e92723a6d74f1d2ee78d9ad6
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  4 May 2025 11:09:45 +0200

fix crash if measure is not available, use vqf-prefix more consistently

Diffstat:
Msrc/exchangedb/exchangedb_aml.c | 22+++++++++++++++++++++-
Msrc/kyclogic/taler-exchange-helper-measure-tops-3rdparty-check | 6+++---
Msrc/kyclogic/taler-exchange-helper-measure-tops-kyx-check | 12++++++------
3 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/src/exchangedb/exchangedb_aml.c b/src/exchangedb/exchangedb_aml.c @@ -61,7 +61,27 @@ TALER_EXCHANGEDB_persist_aml_program_result ( jmeasures = TALER_KYCLOGIC_get_jmeasures ( lrs, apr->details.success.new_measures); - GNUNET_assert (NULL != jmeasures); + if (NULL == jmeasures) + { + char *err; + + GNUNET_break (0); + GNUNET_asprintf (&err, + "Failed to find measures `%s' specified in AML program output", + apr->details.success.new_measures); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "AML program specified invalid measures `%s'\n", + apr->details.success.new_measures); + qs = plugin->insert_aml_program_failure ( + plugin->cls, + process_row, + account_id, + err, + TALER_EC_EXCHANGE_KYC_AML_PROGRAM_MALFORMED_RESULT); + GNUNET_free (err); + GNUNET_break (qs > 0); + return qs; + } } qs = plugin->clear_aml_lock ( diff --git a/src/kyclogic/taler-exchange-helper-measure-tops-3rdparty-check b/src/kyclogic/taler-exchange-helper-measure-tops-3rdparty-check @@ -65,7 +65,7 @@ do exit 0 ;; v) - echo "$0 v0.0.2" + echo "$0 v0.0.3" exit 0 ;; V) @@ -103,7 +103,7 @@ in FORM="none" ;; "true") - FORM="902.9" + FORM="vqf-902.9" ;; esac @@ -129,7 +129,7 @@ in # Force user to fill in $FORM NEW_RULES=$(echo "$CURRENT_RULES" | jq '(.rules[] |= if (.rule_name=="deposit-limit-zero" or .measures[0] == "form-vqf-902.11") then .measures=["form-'${FORM}'"] else . end)') INVESTIGATE="false" - NEW_MEASURES='"form-vqf-'${FORM}'"' + NEW_MEASURES='"form-'${FORM}'"' ;; esac diff --git a/src/kyclogic/taler-exchange-helper-measure-tops-kyx-check b/src/kyclogic/taler-exchange-helper-measure-tops-kyx-check @@ -66,7 +66,7 @@ do exit 0 ;; v) - echo "$0 v0.0.1" + echo "$0 v0.0.2" exit 0 ;; V) @@ -104,22 +104,22 @@ in FORM="none" ;; "OPERATIONAL") - FORM="902.11" + FORM="vqf-902.11" ;; "FOUNDATION") # FIXME: #9825: Not yet supported! -# FORM="902.12" +# FORM="vqf-902.12" ;; "TRUST") # FIXME: #9027: Not yet supported! -# FORM="902.13" +# FORM="vqf-902.13" ;; "LIFE_INSURANCE") # FIXME: #9826: Not yet supported! -# FORM="902.15" +# FORM="vqf-902.15" ;; "OTHER") - FORM="902.9" + FORM="vqf-902.9" ;; esac