1
0
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:
Oscar Hinton 2021-12-08 17:43:21 +00:00 committed by GitHub
parent 4ccbf091fb
commit 71c4b53999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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))
{

View File

@ -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;
}