-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GODT-2637): Fix rfc5322 address list parsing with trailing sep.
Fix parsing of addresses if there is no more input after the separator.
- Loading branch information
1 parent
d18e593
commit edc685b
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -880,3 +880,10 @@ func FuzzRFC5322(f *testing.F) { | |
_, _ = parseNameAddr(p) | ||
}) | ||
} | ||
|
||
func TestParse_AddressAngleAddrOnlyWithSeparator(t *testing.T) { | ||
// EOF was not properly handled after separator. | ||
addrList, err := ParseAddressList("<[email protected]>,") | ||
assert.NoError(t, err) | ||
require.Equal(t, addrList[0].Address, "[email protected]") | ||
} |