Hi guys, I'm having problems using the csrf of the security component.
This is what happening:
I have an indexAction like this:
public function indexAction()
{
$this->view->setVars(array(
'lastSessionToken' => $this->security->getSessionToken(),
'token' => $this->security->getToken(),
'newSessionToken' => $this->security->getSessionToken()
));
}
And this is the view
{{ lastSessionToken }}
<br/>
{{ token}}
<br/>
{{ newSessionToken }}
And an example result is (first time):
cfe1ec0d7755f38f7154fedba5779f56
be60d351a35675294aa7b8d65f6de3a0
be60d351a35675294aa7b8d65f6de3a0
(second time)
6f872476b3f3f30329f1fa011f2878d7
ce9752d9d3170775d29eb00d869129d3
ce9752d9d3170775d29eb00d869129d3
So is not working well, because when I check the last token always I have a new token but I never wanted generate the token again yet.
Testing the application I noticed that the problem is the "javascript_include" that I'm writing before the </body> tag, if I change this writing all the javascript_include in the <head> everthing work perfect.
Can you check how is implemented the javascript_include?
Thanks!! great framework and sorry for my english.