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:�<?phpApp::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">
���<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
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 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+unsubscribe@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.
No comments:
Post a Comment