Skip to content

Commit

Permalink
More work on the @ sign handling
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wregglesworth committed Jun 13, 2024
1 parent 29a2b7b commit e00c9cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/reporting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
}
Expand Down

0 comments on commit e00c9cc

Please sign in to comment.