You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If the website is served through Cloudflare DNS, all the headers listed in get_client_ip_address() are filled with the server IP address. Then the plugin doesn't work and is actually a "security risk" for inexperienced users (for example if the "Add My Current IP Address" button is clicked in the settings, the servers IP address is added which leads to a fully accessible site for any IP, as get_client_ip_address() always returns the server IP).
Cloudflare fills in the clients address into an extra header HTTP_CF_CONNECTING_IP. The solution is to add this to the list of queried headers:
Welcome to Restricted Site Access and thanks for the feedback and potential solution @eightam! If you're able to work up a PR to resolve this, then I'd gladly get that through review and into the next milestoned release.
Describe the bug
If the website is served through Cloudflare DNS, all the headers listed in get_client_ip_address() are filled with the server IP address. Then the plugin doesn't work and is actually a "security risk" for inexperienced users (for example if the "Add My Current IP Address" button is clicked in the settings, the servers IP address is added which leads to a fully accessible site for any IP, as get_client_ip_address() always returns the server IP).
Cloudflare fills in the clients address into an extra header HTTP_CF_CONNECTING_IP. The solution is to add this to the list of queried headers:
Steps to Reproduce
Expected behavior
get_client_ip_address() should return the real client address if Cloudflare is active.
Environment information
Wordpress 5.3.2 through Cloudflare
The text was updated successfully, but these errors were encountered: