Re: The request has been black-holed
Do not disable security component, ajax request works fine with in AppController: public function beforeFilter() { if ($this-request-is('ajax')) $this-Security-unlockedActions = array($this-request-action); } Ajax works fine is you send data in json format and not html code. best regards --cesar El jueves, 14 de junio de 2012 10:20:49 UTC-3, jmail escribió: 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; html xmlns=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 h1MiniChat/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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
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 shivdh...@gmail.com 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.dtdhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/**xhtmlhttp://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 h1MiniChat/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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
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; html xmlns=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 h1MiniChat/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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
Hi SD, Go on the your plug-in and remove security component form you plug-in app controller. Cheers! Saran On Wed, Sep 4, 2013 at 10:00 PM, El Tello adrian...@gmail.com wrote: 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 shivdh...@gmail.com 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.dtdhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/**xhtmlhttp://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 h1MiniChat/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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
Hi, I didn't say the security component was on by default, I said the black hole thing happens by default. So if you have the security thingy turned on, it starts throwing that blackhole thing all over the place. The irony is if you google the black hole issue its packed full of results from pissed off people who are simply told to turn it off with that cfrs setting. Hence, turn it off by default. I installed a 2.3 fresh and put my 1.3 app into it, and it was throwing teh security blackhole left right and centre while as on 1.3 it wasn't. so I'm inclined to think that it is on by default. On Tuesday, April 2, 2013 4:58:42 PM UTC+1, rchavik wrote: On Tuesday, April 2, 2013 9:41:59 PM UTC+7, b...@articad.cc wrote: To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page Okay, That came out wrong. My question would be better phrased as: What makes you think that CakePHP turns on SecurityComponent by default? CakePHP does not turn on Security component by default. AFAIK, the core will _not_ enable SecurityComponent until explicitly asked to. Further, baked applications do not have have them by default. On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
On Thursday, 4 April 2013 11:30:09 UTC+2, b...@articad.cc wrote: Hi, I didn't say the security component was on by default, That's exactly how I read your posts. I said the black hole thing happens by default. Well, it's the main purpose of the security component to secure your app - that mechanism goes hand in hand with using a blakhole for invalid requests. So if you have the security thingy turned on, it starts throwing that blackhole thing all over the place. As it should. Genuinely I don't see your point - if I used a pen and then said WTF IT PUTS INK ON THE PAGE WHEN IT TOUCHES PAPER! - you'd rightly look at me a bit funny and probably walk away. AD -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
When setting up the Security component there are settings that can help (although I am not entirely certain what risks - if any - these introduce): 'Security' = array( 'csrfUseOnce' = false, 'unlockedActions' = array( 'your_action' ) ) Setting csrfUseOnce to false means it will reuse the existing tokens, which in turn means you can refresh the page without a black hole. The unlockedActions setting is clearly more risky as it effectively disables the component for that action - but in some cases it can be useful. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 15:41:59, b...@articad.cc wrote: To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
True, but should it be behaving so badly on installation. Noone really knows what black holed means, it sounds a lot worse than it actually is. Its confusing and somewhat terrifying for it to appear off the bat after a fresh install. csrfUseOnce should be false by default. That's all I'm saying. On Tuesday, April 2, 2013 3:58:37 PM UTC+1, Jeremy Burns wrote: When setting up the Security component there are settings that can help (although I am not entirely certain what risks - if any - these introduce): 'Security' = array( 'csrfUseOnce' = false, 'unlockedActions' = array( 'your_action' ) ) Setting csrfUseOnce to false means it will reuse the existing tokens, which in turn means you can refresh the page without a black hole. The unlockedActions setting is clearly more risky as it effectively disables the component for that action - but in some cases it can be useful. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 15:41:59, b...@articad.cc javascript: wrote: To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+u...@googlegroups.com javascript:. To post to this group, send email to cake...@googlegroups.comjavascript: . Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
I disagree, I'm afraid. The Security component is there to save your 4r53; so by default it is tight - you have to loosen it if you want to. If it were the other way around you'd deploy it thinking you were safe and then find out you weren't (and would shout louder). I too had a learning curve with the Security component but in the end it does what it say it will on the tin. The guide is also useful if you take the tine to read it. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 16:06:35, b...@articad.cc wrote: True, but should it be behaving so badly on installation. Noone really knows what black holed means, it sounds a lot worse than it actually is. Its confusing and somewhat terrifying for it to appear off the bat after a fresh install. csrfUseOnce should be false by default. That's all I'm saying. On Tuesday, April 2, 2013 3:58:37 PM UTC+1, Jeremy Burns wrote: When setting up the Security component there are settings that can help (although I am not entirely certain what risks - if any - these introduce): 'Security' = array( 'csrfUseOnce' = false, 'unlockedActions' = array( 'your_action' ) ) Setting csrfUseOnce to false means it will reuse the existing tokens, which in turn means you can refresh the page without a black hole. The unlockedActions setting is clearly more risky as it effectively disables the component for that action - but in some cases it can be useful. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 15:41:59, b...@articad.cc wrote: To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+u...@googlegroups.com. To post to this group, send email to cake...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
So you didn't turn it off? So when people are browsing the site they are constantly hassled with you have been blackholed?? On Tuesday, April 2, 2013 4:12:49 PM UTC+1, Jeremy Burns wrote: I disagree, I'm afraid. The Security component is there to save your 4r53; so by default it is tight - you have to loosen it if you want to. If it were the other way around you'd deploy it thinking you were safe and then find out you weren't (and would shout louder). I too had a learning curve with the Security component but in the end it does what it say it will on the tin. The guide is also useful if you take the tine to read it. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 16:06:35, b...@articad.cc javascript: wrote: True, but should it be behaving so badly on installation. Noone really knows what black holed means, it sounds a lot worse than it actually is. Its confusing and somewhat terrifying for it to appear off the bat after a fresh install. csrfUseOnce should be false by default. That's all I'm saying. On Tuesday, April 2, 2013 3:58:37 PM UTC+1, Jeremy Burns wrote: When setting up the Security component there are settings that can help (although I am not entirely certain what risks - if any - these introduce): 'Security' = array( 'csrfUseOnce' = false, 'unlockedActions' = array( 'your_action' ) ) Setting csrfUseOnce to false means it will reuse the existing tokens, which in turn means you can refresh the page without a black hole. The unlockedActions setting is clearly more risky as it effectively disables the component for that action - but in some cases it can be useful. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 15:41:59, b...@articad.cc wrote: To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+u...@googlegroups.com. To post to this group, send email to cake...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+u...@googlegroups.com javascript:. To post to this group, send email to cake...@googlegroups.comjavascript: . Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
No, I tested, handled the errors and realised that if either (i) I hadn't done my job properly or (ii) the people trying to break my site are cleverer than me then I'm better off black holing in some cases rather than have the client chase me because someone stole something from his site. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 16:40:59, b...@articad.cc wrote: So you didn't turn it off? So when people are browsing the site they are constantly hassled with you have been blackholed?? On Tuesday, April 2, 2013 4:12:49 PM UTC+1, Jeremy Burns wrote: I disagree, I'm afraid. The Security component is there to save your 4r53; so by default it is tight - you have to loosen it if you want to. If it were the other way around you'd deploy it thinking you were safe and then find out you weren't (and would shout louder). I too had a learning curve with the Security component but in the end it does what it say it will on the tin. The guide is also useful if you take the tine to read it. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 16:06:35, b...@articad.cc wrote: True, but should it be behaving so badly on installation. Noone really knows what black holed means, it sounds a lot worse than it actually is. Its confusing and somewhat terrifying for it to appear off the bat after a fresh install. csrfUseOnce should be false by default. That's all I'm saying. On Tuesday, April 2, 2013 3:58:37 PM UTC+1, Jeremy Burns wrote: When setting up the Security component there are settings that can help (although I am not entirely certain what risks - if any - these introduce): 'Security' = array( 'csrfUseOnce' = false, 'unlockedActions' = array( 'your_action' ) ) Setting csrfUseOnce to false means it will reuse the existing tokens, which in turn means you can refresh the page without a black hole. The unlockedActions setting is clearly more risky as it effectively disables the component for that action - but in some cases it can be useful. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 Apr 2013, at 15:41:59, b...@articad.cc wrote: To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+u...@googlegroups.com. To post to this group, send email to cake...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+u...@googlegroups.com. To post to this group, send email to cake...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
On Tuesday, April 2, 2013 9:41:59 PM UTC+7, b...@articad.cc wrote: To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page Okay, That came out wrong. My question would be better phrased as: What makes you think that CakePHP turns on SecurityComponent by default? CakePHP does not turn on Security component by default. AFAIK, the core will _not_ enable SecurityComponent until explicitly asked to. Further, baked applications do not have have them by default. On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
RE: The request has been black-holed
I am no expert and hate the black-hole. My sites use a s#it load of ajax request which Security cannot handle with forms so I created my own lock / key methods. Pretty much based off the idea of Security hashing the fields then checking on submit to match for form tampering. So every time a form is submitted I generate the $lock and on form submit the $lock is checked against the $key so it prevents CSRF, form tampering and all that good stuff. Beats having to black hole and wonder why! From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of b...@articad.cc Sent: Tuesday, April 02, 2013 12:12 PM To: cake-php@googlegroups.com Cc: jmail; step...@foundfamily.co.uk Subject: Re: The request has been black-holed To save people form themselves? To save the world? I really don't care. Bottom line: That blackholed request thing is a usability nightmare. You merely have to reload the page On Monday, April 1, 2013 6:41:44 AM UTC+1, rchavik wrote: On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
On Thursday, March 28, 2013 4:57:38 PM UTC+7, b...@articad.cc wrote: Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. Why do you think CakePHP turns SecurityComponent on by default? -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The request has been black-holed
Security features like this that cause issues with basic flow, should be OFF by default. CakePHP is it's own worst enemy for leaving it in. The way a framework should work is that it gets you up and gong quickly, we should not be expected to have read one line on one of the many pages in it's documentation in order ot get a half reasonable functionality. This read the docs comment is all very well, but if you have to sift through security (thats assuming you know that it is a security issue and what blackhole means), then it's annoying. On Friday, July 20, 2012 4:10:53 PM UTC+1, Steve Found wrote: Have a go at reading the Security component documentation before insulting the framework ;) http://api.cakephp.org/class/security-component#method-SecurityComponentblackHole This was actually the FIRST link from the google search 'cakephp security component black hole' On 14/06/12 14:56, jmail wrote: anyone? � That drives me crazy. Completly clean application with one form doing me that thing. How can I live? I am so mad that I am thinking about throwing away that CaShitPHP forever � � W dniu czwartek, 14 czerwca 2012 15:20:49 UTC+2 u�ytkownik jmail napisa�: 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; html xmlns=http://www.w3.org/1999/xhtml; head �meta http-equiv=Content-Type content=text/html; / �?php ��echo $this-Html-css('cake.generic'); �? /head body �div id=container ��div id=header ���h1MiniChat/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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. � � To unsubscribe from this group, send email to cake-php+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/cake-php -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http
Re: The request has been black-holed
Have a go at reading the Security component documentation before insulting the framework ;) http://api.cakephp.org/class/security-component#method-SecurityComponentblackHole This was actually the FIRST link from the google search 'cakephp security component black hole' On 14/06/12 14:56, jmail wrote: anyone? That drives me crazy. Completly clean application with one form doing me that thing. How can I live? I am so mad that I am thinking about throwing away that CaShitPHP forever W dniu czwartek, 14 czerwca 2012 15:20:49 UTC+2 użytkownik jmail napisał: 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; / ?php echo $this-Html-css('cake.generic'); ? /head body div id=container div id=header h1MiniChat/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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: The request has been black-holed
This situation is related to Security component. Test before disabling on chat controller http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#disabling-the-csrf-protection I have similar situation for ajax request and put this on beforeFilter in AppController // Disable Security component for XHR if ($this-RequestHandler-isAjax()) { $this-Security-csrfCheck=false; $this-Security-validatePost = false; } On Thursday, June 14, 2012 11:28:15 AM UTC-3, jmail wrote: Oh yes. Another importand information. That is only happen on Internet Explorer. jmail W dniu czwartek, 14 czerwca 2012 15:20:49 UTC+2 użytkownik jmail napisał: 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; html xmlns=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 h1MiniChat/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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
The request has been black-holed
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; html xmlns=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 h1MiniChat/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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: The request has been black-holed
anyone? That drives me crazy. Completly clean application with one form doing me that thing. How can I live? I am so mad that I am thinking about throwing away that CaShitPHP forever W dniu czwartek, 14 czerwca 2012 15:20:49 UTC+2 użytkownik jmail napisał: 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; html xmlns=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 h1MiniChat/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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: The request has been black-holed
Oh yes. Another importand information. That is only happen on Internet Explorer. jmail W dniu czwartek, 14 czerwca 2012 15:20:49 UTC+2 użytkownik jmail napisał: 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; html xmlns=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 h1MiniChat/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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php