Skip to content

Commit 4b4101d

Browse files
committed
fix: fix strip tag
1 parent f28acee commit 4b4101d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ func getUniqueDeviceID(hostInfo models.DomainAPIVulnerabilityHostInfoV2) (string
6161

6262
func findEmailTag(tags []string, emailHost string) (email string, err error) {
6363
for _, tag := range tags {
64+
tag = strings.TrimLeft(tag, tagFalconPrefix)
65+
6466
if !strings.HasPrefix(tag, tagEmailPrefix) {
6567
continue
6668
}
@@ -80,7 +82,6 @@ func findEmailTag(tags []string, emailHost string) (email string, err error) {
8082
}
8183

8284
email = strings.ToLower(email)
83-
email = strings.TrimLeft(email, tagFalconPrefix)
8485
email = strings.Replace(email, fmt.Sprintf("/%s", emailHost), fmt.Sprintf("@%s", emailHost), 1)
8586
email = strings.ReplaceAll(email, "/", ".")
8687

0 commit comments

Comments
 (0)