Describe the bug
In the 0.15.0 update pull request #728 adds the user's IP address to the email message. That code $_SERVER['REMOTE_ADDR'] to find the address. But for sites that sit behind Cloudflare's proxy that variable will return the proxy's IP address, not the user's. You can access the user's IP address from $_SERVER['HTTP_CF_CONNECTING_IP']. This message should be updated to check for that variable first, or filter the found IP address so we can separately add filters to check that variable.
Steps to Reproduce
- Run this plugin on a site that sits behind Cloudflare's proxy
- Trigger the email message about a login discussed in pull request #728
- Compare the IP address the generated email message has to your own
- Notice they differ
Screenshots, screen recording, code snippet
No response
Environment information
No response
Please confirm that you have searched existing issues in this repository.
Yes
Please confirm that you have tested with all plugins deactivated except Two-Factor.
Yes
Describe the bug
In the 0.15.0 update pull request #728 adds the user's IP address to the email message. That code
$_SERVER['REMOTE_ADDR']to find the address. But for sites that sit behind Cloudflare's proxy that variable will return the proxy's IP address, not the user's. You can access the user's IP address from$_SERVER['HTTP_CF_CONNECTING_IP']. This message should be updated to check for that variable first, or filter the found IP address so we can separately add filters to check that variable.Steps to Reproduce
Screenshots, screen recording, code snippet
No response
Environment information
No response
Please confirm that you have searched existing issues in this repository.
Yes
Please confirm that you have tested with all plugins deactivated except Two-Factor.
Yes