$this->escape($foo) in view files
Zend Framework Certification, MVC, Performance, Diagnosis and Maintainability, Mail, Infrastructure, Forms, Filtering and Validation, Coding Standards, Coding Standards, Coding Standards, Security, search, Web Services, Authentication and Access, Security, Database
Showing posts with label Zend Framework Security. Show all posts
Showing posts with label Zend Framework Security. Show all posts
Sunday, 23 November 2014
Thursday, 19 July 2012
Zend Framework Central Authentication
Zend Framework Central Authentication
class FilterPlugin extends Zend_Controller_Plugin_Abstract
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
$params = $request->getParams();
$controller = $request->getControllerName();
$action = $request->getActionName();
$filter = $GLOBALS['filters'][$controller][$action];
$validator = $GLOBALS['validators'][$controller][$action];
$inputdata = new Zend_Filter_Input($filter, $validator, $params);
if (!$inputdata ->isValid()) {
$request->setModuleName('default')
->setControllerName('error')
->setActionName('illegalparam')
->setDispatched(false);
return;
}
}
- Zend Framework follow MVC Design with Dispatcher.
- Auth / ACL Implement
- Validate & Filter the URL with using dispatcher
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
$params = $request->getParams();
$controller = $request->getControllerName();
$action = $request->getActionName();
$filter = $GLOBALS['filters'][$controller][$action];
$validator = $GLOBALS['validators'][$controller][$action];
$inputdata = new Zend_Filter_Input($filter, $validator, $params);
if (!$inputdata ->isValid()) {
$request->setModuleName('default')
->setControllerName('error')
->setActionName('illegalparam')
->setDispatched(false);
return;
}
}
Subscribe to:
Posts (Atom)