cachet: CSRF token validation failed

I am totally sure it has to do something with my environment but I could need a little help. I alway had Cachet good working on Redhat OpenShift, as they are moving to a new platform I decided to move away to my own FreeBSD server.

As for my enviroment I have downloaded the source with Git and followed the whole documentation https://docs.cachethq.io/docs/installing-cachet. I use FreeBSD 10, PHP56, NGINX, composer and PDO MySQL extension.

As for this issue I already cleared cache, did a new app:install, config:cache, got my app:key nicely filled in my .env-file, correctly set permissions for my WWW-user:777 (temp) and such sort of things.

I have no caching apps tho. Any idea what this could be? When I browse to https://status.domain.com/setup I see the config page and as soon as I fill in my stuff I get: “CSRF TOKEN VALIDATION FAILED”.

`APP_ENV=production APP_DEBUG=true APP_URL=http://status.xxxxxxxxx.nl APP_KEY=base64:dtZmW2niOo/JUD+1lJDJPbZz/ywuAKUFN7xxxxxxxxx

DB_DRIVER=mysql DB_HOST=localhost DB_UNIX_SOCKET=null DB_DATABASE=xxxxxxxxx DB_USERNAME=xxxxxxxxx DB_PASSWORD=xxxxxxxxx DB_PORT=null DB_PREFIX=null

CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync

CACHET_BEACON=true CACHET_EMOJI=false CACHET_AUTO_TWITTER=true `

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 55 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Also having this issue.

Hi there Same problem today with fresh docker install (Cachet: 2.4 PHP 7.2.18)

CSRF error when i try to log me to dashboard. Session driver or session cache in file or apc mode do the same effect.

Any idea ?

Set SESSION_DOMAIN to <ip address>

@jgadbois I’m using the docker file with cachet version as 2.4, this is how i use it

FROM nginx:1.15.12-alpine

EXPOSE 8000 CMD [“/sbin/entrypoint.sh”]

ARG cachet_ver ARG archive_url

ENV cachet_ver ${cachet_ver:-2.4} ENV archive_url ${archive_url:-https://github.com/cachethq/Cachet/archive/${cachet_ver}.tar.gz}

Cool, you probably want to docker-compose down so everything completely resets

I’m happy to report that switching to the 2.4 branch worked!

@jbrooksuk I’m sorry. I was wrong. It went well. Thank you so, so much!

Double fixed in e426eff9