aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-11-07 16:18:29 +0100
committerFlorian Dold <florian@dold.me>2024-11-07 16:18:29 +0100
commit2bc9161817dae676f1205bdcb2ef1466d5718da4 (patch)
treeebf905a69958736ad4ac4373f46a2a086d6487b7
parentfadda02cfe8d90cb72cc0e553ebf25230d69e0b3 (diff)
fix parsing of verboten in non-config rules
-rw-r--r--src/kyclogic/kyclogic_api.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c
index 910f98c62..1d15cb2f0 100644
--- 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)