[英]CodeIgniter XSS Filter issues
应用程序/控制器/welcome.php
<?php
class Welcome extends CI_Controller {
public function index()
{
if ($val = $this->input->post('test'))
{
var_dump($val);
}
else
{
$this->load->view('welcome_message');
}
}
}
应用程序/视图/weclome_message.php
<form action="" method="POST">
<input type="text" name="test" />
<input type="submit" />
</form>
XSS过滤器打开且输入%9c的输出:
string(1) "œ"
XSS过滤器关闭且输入%9c的输出:
string(3) "%9c"
我期望第一个与第二个相同。 到底是什么情况?
我认为那是因为
$str = rawurldecode($str);
在xss_clean函数中。 看一下346行:
https://github.com/EllisLab/CodeIgniter/blob/develop/system/core/Security.php
您可以尝试注释该行,然后看看会发生什么。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.