- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
400:The CSRF token could not be verified.
2 weeks 4 days ago - 2 weeks 2 days ago #243592
by yuto0419
400:The CSRF token could not be verified. was created by yuto0419
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition 5.6.9+230306
Own server or LimeSurvey hosting:Own Server
Survey theme/template:Fruity
==================
Hi!
I would like to create a simple page like the one below and implement a function to transition to Limesurvey.
<!DOCTYPE html>
<html>
<head>
<title>simple php page</title>
</head>
<body>
<h1>Hello, World!</h1>
<form method="post" action="https:
~~~/LimeSurvey/index.php">
<input type="submit" value="LimeSurvey">
But when I press the button I get "400: Could not validate CSRF token." error.
I have verified that the URL I set during operation is correct.
Please tell me how to transition to Limesurvey when I press the button.
Your LimeSurvey version: LimeSurvey Community Edition 5.6.9+230306
Own server or LimeSurvey hosting:Own Server
Survey theme/template:Fruity
==================
Hi!
I would like to create a simple page like the one below and implement a function to transition to Limesurvey.
<!DOCTYPE html>
<html>
<head>
<title>simple php page</title>
</head>
<body>
<h1>Hello, World!</h1>
<form method="post" action="https:

<input type="submit" value="LimeSurvey">
But when I press the button I get "400: Could not validate CSRF token." error.
I have verified that the URL I set during operation is correct.
Please tell me how to transition to Limesurvey when I press the button.
Last edit: 2 weeks 2 days ago by yuto0419.
Please Log in to join the conversation.
2 weeks 4 days ago #243619
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic 400:The CSRF token could not be verified.
Please use English in this section of the forum.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: yuto0419
Please Log in to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13146
- Thank you received: 2423
2 weeks 1 day ago - 2 weeks 1 day ago #243647
by DenisChenu
Surely an issue with your session configuration.
See @tpartner answer.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic 400:The CSRF token could not be verified.
See @tpartner answer.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 2 weeks 1 day ago by DenisChenu. Reason: See @tpartner answer.
Please Log in to join the conversation.
2 weeks 1 day ago #243650
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic 400:The CSRF token could not be verified.
Why use a form? Why not a simple link?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
Please Log in to join the conversation.
2 weeks 1 day ago #243665
by yuto0419
Replied by yuto0419 on topic 400:The CSRF token could not be verified.
This is because I want to prepare an input for entering the respondent's attributes and email address and then 'post' it.
I would like to issue a token by inserting the attribute and email address as a key and the respondent into the DB, set the question ID and token as the URL, and transition to the answer screen.
I would like to issue a token by inserting the attribute and email address as a key and the respondent into the DB, set the question ID and token as the URL, and transition to the answer screen.
Please Log in to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13146
- Thank you received: 2423
2 weeks 22 hours ago #243676
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic 400:The CSRF token could not be verified.
2 solutions
1. Deactivate the CRSG protection (personnaly i don't do it, it's a really bad solution) : manual.limesurvey.org/Optional_settings#Request_settings
2. Use GET action for you form : manual.limesurvey.org/URL_fields#Prefill...using_GET_parameters
1. Deactivate the CRSG protection (personnaly i don't do it, it's a really bad solution) : manual.limesurvey.org/Optional_settings#Request_settings
2. Use GET action for you form : manual.limesurvey.org/URL_fields#Prefill...using_GET_parameters
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: yuto0419
Please Log in to join the conversation.