Skip to content

BUG: contact normalization does not strip angle brackets #1122

@andrinoff

Description

@andrinoff

Describe the bug

config/cache.go:151-153:

func normalizeContactEmail(email string) string {
    return strings.ToLower(strings.Trim(strings.TrimSpace(email), ","))
}

Email addresses passed in from From: headers commonly arrive as <foo@bar.com>. The angle brackets are not stripped, so the cached entry stores <foo@bar.com> literally and never matches future lookups against foo@bar.com.

Expected behavior

Strip < and > (and any leading/trailing whitespace) before lowercasing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions