php - 如何在CakePHP 3. *中以各种形式在项目中添加csrf,安全 token

标签 php security cakephp-3.0 csrf

在我的项目中,我找不到任何的csrf和附加的security标记。
有没有办法为我的项目中的每个表单添加这些标记?

最佳答案

AppController方法中添加以下行。

$this->loadComponent('Csrf');
$this->loadComponent('Security');

关于php - 如何在CakePHP 3. *中以各种形式在项目中添加csrf,安全 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57745749/

相关文章:

c - 注入(inject)数据包以终止 TCP 连接

cakephp-3.0 - CakePHP 3 : Inflector class not found

javascript - 如何在不刷新页面的情况下更改路由和内容? (机器人友好)

php - 在Linux上使用ImageMagick命令行进行批量转换时,结果损坏

php - 使用 PHP preg_match_all,获取 href 的值

PHP 面向对象 : Get all declared classes which are have extended another parent class

iOS - 限制应用程序在某些域 Web API swift 上发送请求

security - Amazon Linux 支持的 SSL 中等强度密码套件

session - CakePHP 3 丢失身份验证 session

php - 选择字段时不会加载关联