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 Sep 1, 2021
1 parent 422602f commit a51c147
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private async Task<bool> ValidateRecaptcha(string? recaptchaResponse)
// skip validation if we don't enable recaptcha
if ((_options.Recaptcha != null) && string.IsNullOrWhiteSpace(_options.Recaptcha.PrivateKey))
return true;
else if ((_options.Recaptcha != null) && (string.IsNullOrEmpty(recaptchaResponse) != false))
else if ((_options.Recaptcha != null) && (string.IsNullOrEmpty(recaptchaResponse) != true))
{
var requestUrl = new Uri(
$"https://www.google.com/recaptcha/api/siteverify?secret={_options.Recaptcha.PrivateKey}&response={recaptchaResponse}");
Expand Down

0 comments on commit a51c147

Please sign in to comment.