merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 82213ff26525028985327310e975115e0364ef8b
parent 4c1d86845e6ab35f53110f53ae788f02941a2906
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Thu, 13 Nov 2025 13:50:51 +0100

auth: do not op assert, slightly better logging

Diffstat:
Msrc/backend/taler-merchant-httpd.c | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c @@ -338,7 +338,6 @@ permission_in_scope (const char *permission_required, &refreshable); if (NULL == perms_tmp) { - GNUNET_break_op (0); return false; } last_dash = strrchr (permission_required, @@ -1079,9 +1078,15 @@ process_basic_auth (struct TMH_HandlerContext *hc, if (GNUNET_OK == check_auth_instance (authn_s, hc->instance)) + { hc->auth_scope = TMH_AS_ALL; + } else + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Basic authentication failed!\n"); hc->auth_scope = TMH_AS_NONE; + } } @@ -2460,11 +2465,10 @@ url_handler (void *cls, "'" RFC_8959_PREFIX "' prefix or 'Bearer' missing in 'Authorization' header"); } - GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_UNAUTHORIZED, TALER_EC_MERCHANT_GENERIC_UNAUTHORIZED, - "Check 'Authorization' header"); + "Check credentials in 'Authorization' header"); } } /* if (use_private) */