xperseguers / t3ext-cloudflare

The Cloudflare TYPO3 extension ensures your TYPO3 website is running optimally on the Cloudflare platform.
https://extensions.typo3.org/extension/cloudflare
GNU General Public License v3.0
7 stars 11 forks source link

Keep originating IP address for backend authentication #13

Closed dahaupt closed 3 years ago

dahaupt commented 3 years ago

In order to keep the global configuration option lockIP enabled, it is mandatory to restore the original IP address of the client. Otherwise, (backend) users will lose their sessions once the proxy IP address of Cloudflare changes.

Currently, this does not work as expected for backend sessions using option enableOriginatingIPs=true, as the BackendUserAuthentication uses a cached value of the environment variable $_SERVER['REMOTE_ADDR']. This results in using Cloudflare's proxy IP for the IP lock mechanism.