commit 000fb7d39c7e1dc233f95e25846397bf1cf52565
parent 74b01bc7b2b80923ec06a2ac44200317de14e821
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Fri, 10 Jul 2026 19:15:00 +0200
fixes
Diffstat:
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/donau/donau-httpd.c b/src/donau/donau-httpd.c
@@ -286,11 +286,18 @@ proceed_with_handler (struct DH_RequestContext *rc,
MHD_HTTP_METHOD_PATCH));
enum MHD_Result ret;
- if ( (rh->needs_authorization) &&
- (NULL != admin_bearer) )
+ if (rh->needs_authorization)
{
const char *ah;
+ if (NULL == admin_bearer)
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (rc->connection,
+ MHD_HTTP_FORBIDDEN,
+ TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT,
+ "authorization required");
+ }
ah = MHD_lookup_connection_value (rc->connection,
MHD_HEADER_KIND,
MHD_HTTP_HEADER_AUTHORIZATION);
diff --git a/src/donaudb/test_donaudb.c b/src/donaudb/test_donaudb.c
@@ -209,7 +209,7 @@ run (void *cls)
struct GNUNET_CRYPTO_RsaBlindedMessage *rsa;
if (NULL ==
- (ctx = DONAUDB_connect (cfg)))
+ (ctx = DONAUDB_connect_admin (cfg)))
{
fprintf (stderr,
"Failed to connect to database\n");