Bug #17011
openCookies clash between different firewalls accessed via the same hostname
0%
Description
If you have access to multiple firewalls on different port-forwards on a single hostname, then you can only log in to one at a time - they all set an identically named `PHPSESSID` cookie, causing it to keep the login session for the last firewall you logged into.
We could prevent clashes by setting php.ini to use a unique session name instead of `PHPSESSID`.
Perhaps something like this in /etc/rc.php_ini_setup:
session.name = SESSID_$(/sbin/sysctl -n kern.hostuuid | /sbin/sha256sum | /usr/bin/cut -d' ' -f1)
This should give a unique, unchanging value for each firewall, using the system UUID, hashing it to prevent it leaking the info.
(This is the best data I can think of to use. I considered openssl rand, but this would log people out if php-fpm restarts.
I also considered /var/db/uniqueid, set/used by system_get_uniqueid(), but it's not clear whether this would necessarily be set before the web interface first starts.)
No data to display
Also available in: Atom