[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: -fix NPE
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: -fix NPE |
Date: |
Sun, 10 Sep 2023 19:49:40 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 002fd47e -fix NPE
002fd47e is described below
commit 002fd47ecdcaf4541a943b75332285dacf64f52f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Sep 10 19:49:36 2023 +0200
-fix NPE
---
src/backend/taler-merchant-httpd.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/backend/taler-merchant-httpd.c
b/src/backend/taler-merchant-httpd.c
index dfffa36d..17e50dbc 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -1814,10 +1814,18 @@ url_handler (void *cls,
(! auth_malformed) &&
(0 == strcmp (auth,
TMH_default_auth)) );
- hc->auth_scope = auth_ok
- ? TMH_AS_ALL
- : TMH_check_token (auth,
- hc->instance->settings.id);
+ if (auth_ok)
+ {
+ hc->auth_scope = TMH_AS_ALL;
+ }
+ else
+ {
+ if (NULL != hc->instance)
+ hc->auth_scope = TMH_check_token (auth,
+ hc->instance->settings.id);
+ else
+ hc->auth_scope = TMH_AS_NONE;
+ }
/* We grant access if:
- scope is 'all'
- rh has an explicit non-NONE scope that matches
@@ -1829,8 +1837,8 @@ url_handler (void *cls,
(0 == strcmp (MHD_HTTP_METHOD_GET,
method)) ) ) )
{
- if ( auth_malformed &&
- (TMH_AS_NONE == hc->auth_scope) )
+ if (auth_malformed &&
+ (TMH_AS_NONE == hc->auth_scope) )
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_UNAUTHORIZED,
TALER_EC_GENERIC_PARAMETER_MALFORMED,
@@ -1930,7 +1938,7 @@ add_instance_cb (void *cls,
{
struct TMH_MerchantInstance *mi;
enum GNUNET_DB_QueryStatus qs;
-
+
(void) cls;
mi = TMH_lookup_instance (is->id);
if (NULL != mi)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: -fix NPE,
gnunet <=