Skip to content

Commit

Permalink
Fix ReCaptcha validation
Browse files Browse the repository at this point in the history
  • Loading branch information
olddanmer authored and RomainL972 committed Apr 29, 2022
1 parent 579b48d commit 47827e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Unosquare.PassCore.Web/Controllers/PasswordController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private async Task<bool> ValidateRecaptcha(string? recaptchaResponse)
if (_options.Recaptcha != null && string.IsNullOrWhiteSpace(_options.Recaptcha.PrivateKey))
return true;

if (_options.Recaptcha == null || string.IsNullOrEmpty(recaptchaResponse) == false)
if (_options.Recaptcha == null || string.IsNullOrEmpty(recaptchaResponse) == true)
return false;

var requestUrl = new Uri(
Expand All @@ -140,4 +140,4 @@ private async Task<bool> ValidateRecaptcha(string? recaptchaResponse)

return Convert.ToBoolean(validationResponse["success"], System.Globalization.CultureInfo.InvariantCulture);
}
}
}

0 comments on commit 47827e5

Please sign in to comment.