Yii 1.1.x URL 中的 XSS 注入
Yii 1.1.x XSS Injection in URL
当我导航到 url:
时,我发现我的应用对来自 URL 的 xss 不安全
http://host.local/app/Dashboard<script>alert("test")</script>
脚本将注入错误信息:
The system is unable to find the requested action "adminDashboard
如何停止?
解决方案非常简单:
只需检查配置文件中的错误处理程序
并在视图中添加 CHtml::encode($error["message"]).
当我导航到 url:
时,我发现我的应用对来自 URL 的 xss 不安全http://host.local/app/Dashboard<script>alert("test")</script>
脚本将注入错误信息:
The system is unable to find the requested action "adminDashboard
如何停止?
解决方案非常简单: 只需检查配置文件中的错误处理程序 并在视图中添加 CHtml::encode($error["message"]).