mirror of
https://github.com/bitwarden/server
synced 2025-12-24 04:03:25 +00: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