From e00c9ccb470ad436bee4c2228ebb10d35419351e Mon Sep 17 00:00:00 2001 From: John Wregglesworth Date: Thu, 13 Jun 2024 12:32:19 -0700 Subject: [PATCH] More work on the @ sign handling --- internal/reporting.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/reporting.go b/internal/reporting.go index 66c5783..a963a3d 100644 --- a/internal/reporting.go +++ b/internal/reporting.go @@ -500,12 +500,12 @@ type ResourceInfo struct { func (i *Internal) fixUsername(username string) string { var userSuffix string - if strings.HasPrefix("@", i.UserSuffix) { + if strings.HasPrefix(i.UserSuffix, "@") { userSuffix = i.UserSuffix } else { userSuffix = fmt.Sprintf("@%s", i.UserSuffix) } - if strings.HasSuffix(username, userSuffix) { + if strings.HasSuffix(userSuffix, username) { return username } return fmt.Sprintf("%s%s", username, userSuffix) @@ -589,6 +589,8 @@ func (i *Internal) DescribeAnalysisHandler(c echo.Context) error { return err } + log.Infof("2 user: %s, user suffix: %s, host: %s", user, i.UserSuffix, host) + filter := map[string]string{ "subdomain": host, }