Disable the security component for this url. You are sending a post request
with an invalid csrf token.
El 04/09/2013 17:50, "SHIVDHWAJ PANDEY" <[email protected]> escribió:

> Do you found the solution for this problem "The request has been
> black-holed". As i am facing this too but cant find out how to solve it ?
>
> On Thursday, 14 June 2012 18:50:49 UTC+5:30, jmail wrote:
>>
>> Hi all!
>>
>> I've got a stupid problem :/
>>
>> I am building small chat. I need that for my customer - it's not importand
>>
>> I've got:
>>
>> AppController:
>>
>> <?php
>> App::uses('Controller', 'Controller');
>> class AppController extends Controller {
>>  var $uses = array('Config', 'Chat', 'User');
>>  var $helpers = array('Form', 'Html', 'Session');
>>  var $components = array('Session', 'RequestHandler');
>>  var $nonLoginActions = array(
>>   'chat' => array('login')
>>  );
>>  public function beforeFilter() {
>>         parent::beforeFilter();
>>   $this->getConfig();
>>   $this->checkSession();
>>  }
>>
>>  function getConfig(){
>>   $config = $this->Config->find('all');
>>   foreach($config as $element){
>>    Configure::write('config.'.**$element['Config']['name'],
>> $element['Config']['value']);
>>   }
>>  }
>>
>>  function checkSession(){
>>   if(isset($this->**nonLoginActions[$this->**
>> request->params["controller"]]**)){
>>    if(!in_array($this->**request->params["action"],
>> $this->nonLoginActions[$this->**request->params["controller"]]**)){
>>     if(CakeSession::read("**user") === null || CakeSession::read("user")
>> === false){
>>      $this->redirect(array('**controller' => 'chat', 'action' =>
>> 'login'));
>>     }
>>    }
>>   }
>>  }
>>
>> }
>>
>>
>> Controller - ChatController
>>
>> <?php
>> /*
>>  * To change this template, choose Tools | Templates
>>  * and open the template in the editor.
>>  */
>> /**
>>  * Description of ChatController
>>  *
>>  * @author jmail
>>  */
>> class ChatController extends AppController{
>>  var $components = array('Session', 'RequestHandler', 'Security');
>>
>>  function login(){
>>
>>  }
>>
>> }
>>
>> View - login.ctp
>>
>> Logowanie
>> <?php echo $this->Form->create('User', array('inputDefaults' =>
>> array('label' => false,'div' => false)));?>
>> <?php echo $this->Form->input('login', array('type' => 'text', 'label' =>
>> 'Login'));?>
>> <?php echo $this->Form->input('pass', array('type' => 'password', 'label'
>> => 'Hasło'));?>
>> <?php echo $this->Form->end(array('value' => 'Zaloguj się', 'label' =>
>> 'Zaloguj się',  'div' => false));?>
>>
>> Layout - default.ctp
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
>> http://www.w3.org/TR/xhtml1/**DTD/xhtml1-transitional.dtd<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
>> ">
>> <html xmlns="http://www.w3.org/1999/**xhtml<http://www.w3.org/1999/xhtml>
>> ">
>> <head>
>>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>>  <?php
>>   echo $this->Html->css('cake.**generic');
>>  ?>
>> </head>
>> <body>
>>  <div id="container">
>>   <div id="header">
>>    <h1>MiniChat</h1>
>>   </div>
>>   <div id="content">
>>    <?php echo $this->fetch('content'); ?>
>>   </div>
>>  </div>
>> </body>
>> </html>
>>
>> And my problem is:
>>
>> When i go to the http://site/chat/login and press submit button I get
>>
>> The request has been black-holed
>>
>> *Error: * The requested address *'/chat/login'* was not found on this
>> server.
>>
>>
>>
>> Everything is empty. What the hell I am doing wrong?
>>
>> cakephp-cakephp-2.1.3-28-**g645e981
>>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to