用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2100|回复: 2
收起左侧

请教:URL分段传参,传入的参数值是否自动进行安全过滤?

[复制链接]
发表于 2012-10-15 12:36:29 | 显示全部楼层 |阅读模式
全局设置里已将global xss filter设置为TRUE
这样是否可以在php里直接使用URL分段参数,而无需考虑安全性问题了?
比如http://foo.com/index.php/class/method/para1/para2
在源代码的function method ($a,$b) {...}中使用$a,$b前还需要进行安全性检查吗?
求大牛解惑{:soso_e132:}
发表于 2012-10-15 13:38:32 | 显示全部楼层
不用检查了
PHP复制代码
 
//input.php源码
                // Should we filter the input data?
                if ($this->_enable_xss === TRUE)
                {
                        $str = $this->security->xss_clean($str);
                }
 
复制代码
 楼主| 发表于 2012-10-15 14:10:36 | 显示全部楼层
多谢!
自己也试了几个特殊字符,确实会被阻止

本版积分规则