exchange

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

commit 34792f237f836ffd654465cd826569a48f348fbf
parent 2a99f2e7abf0ae5fa5f7cd04589398b0ed7ea9a3
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sat, 15 Aug 2026 21:23:08 +0200

handle parse error on ENABLED properly

Diffstat:
Msrc/kyclogic/kyclogic_api.c | 50+++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 41 insertions(+), 9 deletions(-)

diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c @@ -2562,11 +2562,27 @@ add_rule (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Parsing KYC rule from %s\n", section); - if (GNUNET_YES != - GNUNET_CONFIGURATION_get_value_yesno (cfg, - section, - "ENABLED")) - return GNUNET_OK; + { + enum GNUNET_GenericReturnValue r; + + r = GNUNET_CONFIGURATION_get_value_yesno (cfg, + section, + "ENABLED"); + if ( (GNUNET_SYSERR == r) && + (GNUNET_YES == + GNUNET_CONFIGURATION_have_value (cfg, + section, + "ENABLED")) ) + { + GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, + section, + "ENABLED", + "YES or NO required"); + return GNUNET_SYSERR; + } + if (GNUNET_YES != r) + return GNUNET_OK; + } if (GNUNET_OK != TALER_config_get_amount (cfg, section, @@ -2589,10 +2605,26 @@ add_rule (const struct GNUNET_CONFIGURATION_Handle *cfg, "currency mismatch"); return GNUNET_SYSERR; } - exposed = (GNUNET_YES == - GNUNET_CONFIGURATION_get_value_yesno (cfg, - section, - "EXPOSED")); + { + enum GNUNET_GenericReturnValue r; + + r = GNUNET_CONFIGURATION_get_value_yesno (cfg, + section, + "EXPOSED"); + if ( (GNUNET_SYSERR == r) && + (GNUNET_YES == + GNUNET_CONFIGURATION_have_value (cfg, + section, + "EXPOSED")) ) + { + GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, + section, + "EXPOSED", + "YES or NO required"); + return GNUNET_SYSERR; + } + exposed = (GNUNET_YES == r); + } { enum GNUNET_GenericReturnValue r;