mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
Fixes for StrictEmailAddressAttribute (#1474)
* Use StrictEmail validation for changing email * Add trailing symbols to illegal chars in emails * Add semicolon as always illegal * Replace regex with MimeKit parsing, add unit test * Add more unit tests * Fix linting
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class EmailTokenRequestModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
[StrictEmailAddress]
|
||||
[StringLength(256)]
|
||||
public string NewEmail { get; set; }
|
||||
[Required]
|
||||
|
Reference in New Issue
Block a user