Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use original user's IPAddress in logging and IPFilter when behind (e.g.) Cloudflare #5073

Closed
6 tasks done
skamphuis opened this issue Apr 4, 2022 · 0 comments · Fixed by #5091
Closed
6 tasks done

Comments

@skamphuis
Copy link
Contributor

Description of problem

Is your enhancement request related to a problem? Provide a clear and concise description of the problem.
When a site is behind (a service like) Cloudflare, the user's original IPAddress is not the host address from the request, but instead it's passed in a Request Header. DNN's Login page is already able to handle that and log the oringial user's IPAddress by using the UserRequestIPAddressController class.
However, this method of correctly determining the IP Address isn't applied in other places, like logging 404's and for the IPFiltering.

Description of solution

UserRequestIPAddressController class should be used wherever a user's IPAddress is requested.
Preferably, there should also be a (host level) setting in the Personabar to set the "UserRequestIPHeader" setting.

Description of alternatives considered

Given how services like cloudflare work, there really aren't any, afaik.

Affected browser

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer
  • Edge
    (all, as this isn't browser related)

Affected DNN Versions

  • 9.10.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant