Skip to content

Commit

Permalink
SMTP: Bugfix for search-by-header
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Hinderberger committed Jun 26, 2024
1 parent e65c71c commit 59224ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/smtp/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ func searchByHeaderCommon(headerIdxList []map[string][]string, re *regexp.Regexp
}

func anyHeaderMatches(headers map[string][]string, re *regexp.Regexp) bool {
for k, v := range headers {
header := fmt.Sprintf("%s: %s", k, v)
if re.MatchString(header) {
return true
for k, vs := range headers {
for _, v := range vs {
header := fmt.Sprintf("%s: %s", k, v)
if re.MatchString(header) {
return true
}
}
}

Expand Down

0 comments on commit 59224ae

Please sign in to comment.