commit 21639a545a45a361104b145a07e9dad2069b1d61
parent a967e4a58cbeb6b64a60666834e5eb1983371c08
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 13 Jul 2026 00:07:15 +0200
fix bad prefix match where full match is required
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_auth.c b/src/backend/taler-merchant-httpd_auth.c
@@ -314,12 +314,11 @@ process_basic_auth (struct TMH_HandlerContext *hc,
* The only time we need to handle authentication like this is
* for the token endpoint!
*/
- if ( (0 != strncmp (hc->rh->url_prefix,
- "/token",
- strlen ("/token"))) ||
- (0 != strncmp (MHD_HTTP_METHOD_POST,
- hc->rh->method,
- strlen (MHD_HTTP_METHOD_POST))) ||
+ if ( (0 != strcmp (hc->rh->url_prefix,
+ "/token")) ||
+ (NULL == hc->rh->method) ||
+ (0 != strcmp (MHD_HTTP_METHOD_POST,
+ hc->rh->method)) ||
(NULL == hc->instance))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,