Fixing token key regeneration on requestAction calls (Ticket #2282)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4682 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-03-26 18:13:52 +00:00
parent 2c906bc4c8
commit 994cfd3c89

View file

@ -226,6 +226,7 @@ class SecurityComponent extends Object {
}
}
if (!isset($controller->params['requested']) || $controller->params['requested'] != 1) {
// Add auth key for new form posts
$authKey = Security::generateAuthKey();
$expires = strtotime('+'.Security::inactiveMins().' minutes');
@ -242,6 +243,7 @@ class SecurityComponent extends Object {
$controller->params['_Token'] = $token;
$this->Session->write('_Token', serialize($token));
}
}
/**
* Black-hole an invalid request with a 404 error or custom callback
*