-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not allow Line Separator U+2028 in email
- Loading branch information
Lorenz Van der Eecken
committed
Sep 13, 2024
1 parent
7357d74
commit 5cdcd60
Showing
2 changed files
with
6 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 |
---|---|---|
|
@@ -8754,6 +8754,11 @@ func TestEmail(t *testing.T) { | |
NotEqual(t, errs, nil) | ||
AssertError(t, errs, "", "", "", "", "email") | ||
|
||
s = ` [email protected]` // U+2028 Line Separator | ||
errs = validate.Var(s, "email") | ||
NotEqual(t, errs, nil) | ||
AssertError(t, errs, "", "", "", "", "email") | ||
|
||
s = ` [email protected]` // U+202F Narrow No-Break Space | ||
errs = validate.Var(s, "email") | ||
NotEqual(t, errs, nil) | ||
|