Skip to content

Commit

Permalink
Fixing possible null reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
jooni91 committed Apr 28, 2022
1 parent ef06a16 commit e8bb784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReCaptcha/Filters/ValidateRecaptchaFilter.cs
Expand Up @@ -70,7 +70,7 @@ public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionE
private string? GetRemoteIp(ActionExecutingContext context)
{
return _options.UseRemoteIp ?
context.HttpContext.Connection.RemoteIpAddress.ToString() :
context.HttpContext.Connection.RemoteIpAddress?.ToString() :
null;
}
private bool ShouldShortCircuit(ActionExecutingContext context, ValidationResponse response)
Expand Down

0 comments on commit e8bb784

Please sign in to comment.