Skip to content

Commit

Permalink
fix: fix strip tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hazcod committed May 31, 2021
1 parent f28acee commit 4b4101d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func getUniqueDeviceID(hostInfo models.DomainAPIVulnerabilityHostInfoV2) (string

func findEmailTag(tags []string, emailHost string) (email string, err error) {
for _, tag := range tags {
tag = strings.TrimLeft(tag, tagFalconPrefix)

if !strings.HasPrefix(tag, tagEmailPrefix) {
continue
}
Expand All @@ -80,7 +82,6 @@ func findEmailTag(tags []string, emailHost string) (email string, err error) {
}

email = strings.ToLower(email)
email = strings.TrimLeft(email, tagFalconPrefix)
email = strings.Replace(email, fmt.Sprintf("/%s", emailHost), fmt.Sprintf("@%s", emailHost), 1)
email = strings.ReplaceAll(email, "/", ".")

Expand Down

0 comments on commit 4b4101d

Please sign in to comment.