1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

Check for ascii-only in entire local part of emails (#2072)

This commit is contained in:
Matt Gibson
2022-06-22 17:51:16 -05:00
committed by GitHub
parent f2a02e040c
commit d918f5aae3
2 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ namespace Bit.Core.Utilities
* Must end in a letter (including unicode)
See the unit tests for examples of what is allowed.
**/
var emailFormat = @"[\x00-\x7F]+@.+\.\p{L}+$";
var emailFormat = @"^[\x00-\x7F]+@.+\.\p{L}+$";
if (!Regex.IsMatch(emailAddress, emailFormat))
{
return false;