diff --git a/client/config/config.go b/client/config/config.go index d1747dd..3b68c1a 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -18,6 +18,8 @@ package config import ( + "strings" + "github.com/bloodhoundad/azurehound/v2/constants" ) @@ -80,7 +82,7 @@ func GraphUrl(region string, defaultUrl string) string { } func (s Config) GraphUrl() string { - return GraphUrl(s.Region, s.Graph) + return strings.TrimSuffix(GraphUrl(s.Region, s.Graph), "/") } func ResourceManagerUrl(region string, defaultUrl string) string { @@ -101,5 +103,5 @@ func ResourceManagerUrl(region string, defaultUrl string) string { } func (s Config) ResourceManagerUrl() string { - return ResourceManagerUrl(s.Region, s.Graph) + return strings.TrimSuffix(ResourceManagerUrl(s.Region, s.Graph), "/") } diff --git a/client/rest/utils.go b/client/rest/utils.go index b00f663..543eaa4 100644 --- a/client/rest/utils.go +++ b/client/rest/utils.go @@ -95,7 +95,7 @@ func ParseAud(accessToken string) (string, error) { } else if aud, ok := body["aud"].(string); !ok { return "", fmt.Errorf("invalid 'aud' type: %T", body["aud"]) } else { - return aud, nil + return strings.TrimSuffix(aud, "/"), nil } }