From c84150cedee3af6172474e1043fb735e9accdeb5 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Sun, 21 May 2023 11:07:01 +0800 Subject: [PATCH] Fix getObject() bug for some API --- routers/authz_filter.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/authz_filter.go b/routers/authz_filter.go index 1456987c..2634b2c4 100644 --- a/routers/authz_filter.go +++ b/routers/authz_filter.go @@ -125,7 +125,11 @@ func AuthzFilter(ctx *context.Context) { subOwner, subName := getSubject(ctx) method := ctx.Request.Method urlPath := getUrlPath(ctx.Request.URL.Path) - objOwner, objName := getObject(ctx) + + objOwner, objName := "", "" + if urlPath != "/api/get-app-login" { + objOwner, objName = getObject(ctx) + } if strings.HasPrefix(urlPath, "/api/notify-payment") { urlPath = "/api/notify-payment"