exchange

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

commit 72fa89407aa96537f4eeb00642b0da5a2fff8492
parent 48a636c363419a24d2ecdc1e4ae4fd91ad564afd
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  4 May 2025 09:10:26 +0200

fix pattern matching if there are arguments other than 'q='

Diffstat:
Msrc/util/lang.c | 16++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/util/lang.c b/src/util/lang.c @@ -81,19 +81,15 @@ TALER_pattern_matches (const char *pattern, continue; while (isspace ((int) *lp)) lp++; - if (NULL != qp) + while (NULL != qp) + { while (isspace ((int) *qp)) qp++; - if ( (NULL != qp) && - (0 != strlen (qp)) && - (1 != sscanf (qp, + if (1 == sscanf (qp, "q=%lf", - &q)) ) - { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Unsupported pattern `%s' in HTTP header\n", - pattern); - break; + &q)) + break; + qp = strtok_r (NULL, ";", &sptr2); } if (pattern_matches (lp, value))