cachethq / Docker

A Dockerized version of Cachet.
https://cachethq.io
BSD 3-Clause "New" or "Revised" License
415 stars 280 forks source link

Don't write custom defaults to the .env file #287

Closed hensur closed 6 years ago

hensur commented 6 years ago

I just had this issue when building the docker image using the cachet 2.4 branch: https://github.com/CachetHQ/Cachet/issues/2682

I noticed that no sessions were saved, which lead to a csrf verification failure. I could fix this by deleting these variables from the /var/www/html/.env file: SESSION_DRIVER SESSION_DOMAIN SESSION_SECURE_COOKIE

After that cachet would set it's own defaults for these variables ("file" driver instad of "apc"), those are saved in /var/www/html/config/session.php. I don't know why the apc driver would not save sessions, but I guess it would be better to just use the cachet defaults instead of setting custom ones? One could check if an environment variable was set and only then write it to the .env file...