commit 2bc9161817dae676f1205bdcb2ef1466d5718da4
parent fadda02cfe8d90cb72cc0e553ebf25230d69e0b3
Author: Florian Dold <florian@dold.me>
Date: Thu, 7 Nov 2024 16:18:29 +0100
fix parsing of verboten in non-config rules
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c
@@ -631,6 +631,10 @@ TALER_KYCLOGIC_rules_parse (const json_t *jlrs)
GNUNET_break (0);
goto cleanup;
}
+ if (0 == strcasecmp (str, KYC_MEASURE_IMPOSSIBLE))
+ {
+ rule->verboten = true;
+ }
rule->next_measures[j]
= GNUNET_strdup (str);
}
@@ -962,6 +966,13 @@ TALER_KYCLOGIC_rule_get_instant_measure (
const char *measure_name = r->next_measures[i];
const struct TALER_KYCLOGIC_Measure *ms;
+ if (0 == strcasecmp (measure_name, "verboten"))
+ {
+ /* If any of the measures if verboten, we do not even
+ consider execution of the instant measure. */
+ return NULL;
+ }
+
ms = find_measure (lrs,
measure_name);
if (NULL == ms)