Skip to content

Commit

Permalink
Fix ReCaptcha validation
Browse files Browse the repository at this point in the history
  • Loading branch information
olddanmer committed Jun 4, 2021
1 parent ece0e73 commit acb5403
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 acb5403

Please sign in to comment.