1

I get this error when I try use some of the forms. (Login or signup). I searched on the web, but I dont see any response (I dont want disable the csrf flag)

In signup form, for example, I send the next data:

_csrf:OFNlY3ZOcFdTGR0SNBcfJUAnHTIGeQI0SiZWIjt2HiRqJTUXGiADYg==
SignupForm[username]:test
SignupForm[email]:test@email.com
SignupForm[password]:testtest
signup-button:

I see the csrf code in form:

<form id="form-signup" action="/apps/dev/frontend/web/index.php?r=site%2Fsignup" method="post" role="form">
<input type="hidden" name="_csrf" value="OFNlY3ZOcFdTGR0SNBcfJUAnHTIGeQI0SiZWIjt2HiRqJTUXGiADYg==">

Reading, I see also that now Yii2 Template have to add csrf token inside the head tags, I checked it and its here:

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-param" content="_csrf">
    <meta name="csrf-token" content="OFNlY3ZOcFdTGR0SNBcfJUAnHTIGeQI0SiZWIjt2HiRqJTUXGiADYg==">

Anybody can help me to resolve this problem? Or maybe how I can treat it or found the soulition.

Thanks

Genaut
  • 1,810
  • 2
  • 29
  • 60
  • Does it help if you delete cookies? Are you using latest Yii version? – robsch Dec 31 '15 at 22:34
  • check this link --> http://stackoverflow.com/questions/26459419/why-get-unable-to-verify-your-data-submission-error-in-yii2 – Bloodhound Jan 01 '16 at 04:23
  • Sure, the last version. Fresh install around a week. I already test deleting session, cookies even in other computer and browser. – Genaut Jan 01 '16 at 18:50
  • show your config file for backend/frontend and what url you hit when you get this error ? – Touqeer Shafi Jan 04 '16 at 07:10
  • update yii to 2.10 version and use of this version default config file for requests and sessions. – SADi Nov 08 '16 at 18:49

0 Answers0