diff options
author | Tomas Weinfurt <Tomas.Weinfurt@microsoft.com> | 2022-03-14 19:20:56 +0300 |
---|---|---|
committer | Matt Mitchell <mmitche@microsoft.com> | 2022-03-14 19:20:56 +0300 |
commit | be98e88c760526452df94ef452fff4602fb5bded (patch) | |
tree | 3d82f4be5bb650009ed4de314c6a8c3493c26f49 /src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/EmailAddressAttributeTests.cs | |
parent | 1cb75051f216c1f7ade4d74a5835c7291a3fdfd6 (diff) |
Merged PR 21497: [release/6.0] MSRC 68590 - newlines in domain literalsv6.0.4
This add validation for embedded newlines in email addresses.
Based on https://dev.azure.com/dnceng/internal/_git/dotnet-runtime/pullrequest/20738
There is opt-in System.Net.Mail.EnableFullDomainLiterals switch to allow previous behavior
Diffstat (limited to 'src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/EmailAddressAttributeTests.cs')
-rw-r--r-- | src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/EmailAddressAttributeTests.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/EmailAddressAttributeTests.cs b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/EmailAddressAttributeTests.cs index a0c67ed7d2b..da80016608e 100644 --- a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/EmailAddressAttributeTests.cs +++ b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/EmailAddressAttributeTests.cs @@ -29,6 +29,7 @@ namespace System.ComponentModel.DataAnnotations.Tests yield return new TestCase(new EmailAddressAttribute(), 0); yield return new TestCase(new EmailAddressAttribute(), ""); yield return new TestCase(new EmailAddressAttribute(), " \r \t \n" ); + yield return new TestCase(new EmailAddressAttribute(), "someName@[\r\n\tsomeDomain]"); yield return new TestCase(new EmailAddressAttribute(), "@someDomain.com"); yield return new TestCase(new EmailAddressAttribute(), "@someDomain@abc.com"); yield return new TestCase(new EmailAddressAttribute(), "someName"); |