commit 4678774c426670448c60935026a79634b84003a5 from: Oliver Lowe date: Thu Apr 21 10:27:45 2022 UTC aliases: error on recipient name containing colons commit - 4676ea2acb5a1129ec3c28ba660b60f19e2869ec commit + 4678774c426670448c60935026a79634b84003a5 blob - cb99ad6c6929cf74bc2f830add5f7eeff78cdb2c blob + 72b7bc3b70344d5614b2918026fd5848e9be1915 --- aliases/aliases.go +++ aliases/aliases.go @@ -94,6 +94,9 @@ func parseLine(s string) (recipient, destination strin if !strings.HasSuffix(a[0], ":") { return "", "", fmt.Errorf("parse line: invalid recipient: expected %q, got %q", ":", recipient[len(recipient)]) } + if strings.Contains(recipient, ":") { + return "", "", errors.New("parse line: recipient contains colon character") + } if recipient == "" { return "", "", errors.New("parse line: empty recipient") }