Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am new to cakephp and now I am working on a new project with cakephp by studying. My current doing task is to do CSRF protection for overall project.I have read official cakephp 2 cookbook and I did as explained in that book. But, now I am facing "The request has been black-holed.
Error: The requested address '/admin/accounts/add' was not found on this server." every time the new user add form is submitted.

My code is :
//////////////////////////////////////////////////////////////////////////////////////////////////

public $components = array(
'Security' => array(
'csrfExpires' => '+1 hour'
),
'Search.Prg' => array(
'commonProcess' => array(
'paramType' => 'named',
'filterEmpty' => true
))


);

///////////////////////////////////////////////////////////////////

public function beforeFilter() {
parent::beforeFilter();
$this->layout = 'admin';
$this->Security->blackHoleCallback = '_blackHole';
}

////////////////////////////////////////////////////////////////////

public function _blackHole($error) {
die($error);
}

/////////////////////////////////////////////////////////////////////

By doing so, 'auth' error has appeared.

How should I do?
Please help me.I have googled but it was just the waste of time.I have no way to do.
Please help me.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900