mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
Fix recursive call in TwoFactorWebAuthnDeleteRequestModel (#1750)
* Fix recursive call in TwoFactorwebAuthnDeleteRequestModel * Add new befoer IEnumerable * Use virtual and override
This commit is contained in:
parent
4ccbf091fb
commit
71c4b53999
@ -10,7 +10,7 @@ namespace Bit.Core.Models.Api
|
||||
public string OTP { get; set; }
|
||||
public string Secret => !string.IsNullOrEmpty(MasterPasswordHash) ? MasterPasswordHash : OTP;
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
public virtual IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Secret))
|
||||
{
|
||||
|
@ -236,9 +236,9 @@ namespace Bit.Core.Models.Api
|
||||
[Required]
|
||||
public int? Id { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
foreach (var validationResult in Validate(validationContext))
|
||||
foreach (var validationResult in base.Validate(validationContext))
|
||||
{
|
||||
yield return validationResult;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user