Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Error: Bad Request, CSRF Token

Error: Bad Request, CSRF Token 2 years 2 weeks ago #110830

  • Renier
  • Renier's Avatar
  • Offline
  • Premium Lime
  • Posts: 6
  • Karma: 0
Hi Dennis

I am experiencing the same / similar problem "Bad Request - The CSRF token could not be verified"
The problem is that my client is experiencing this intermittently when submitting pages. (which generally has less than 10 answers on)
We also don't get the problem on the same page.

From 1200 people, 350 completed successfully and only 35 complained about the error.
The problem however is that it is still a significant amount of people.

Please can you give me a idea what I could look for, or how I could go about troubleshooting this problem?

The survey uses TOKENS
Allow multiple responses or update responses with one token = NO
Enable token-based response persistence = YES
We are using Version 2.05+ Build 140618

Regards
Renier
The administrator has disabled public write access.

Error: Bad Request, CSRF Token 2 years 1 week ago #110919

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9290
  • Thank you received: 1325
  • Karma: 384
Hi,

Surely some session issue ?

1st idea: uncomment the database session example in your config.php
2nd idea : Disable CRSF validation : manual.limesurvey.org/Optional_settings#Request_settings
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Error: Bad Request, CSRF Token 4 months 6 days ago #133352

  • id_wahyu
  • id_wahyu's Avatar
  • Offline
  • Junior Lime
  • Posts: 38
  • Karma: 0
Hi Denis.
I got the "Bad Request CSRF token.." as well. And tried follow the link you provided, try to find it at config.php but failed, I can't find that CSRF part at the config.php
I may open the wrong config.php. Please let me know in which folder that config.php that contain CSRF?

Many thanks

Iwan Wahyu
The administrator has disabled public write access.

Error: Bad Request, CSRF Token 4 months 6 days ago #133359

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9290
  • Thank you received: 1325
  • Karma: 384
You must ADD this part to your config.php.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: id_wahyu
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.193 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form