|
|
漏洞名称 HTTP响应拆分漏洞
漏洞级别 高危
漏洞影响
攻击者可能注入自定义HTTP头。例如,攻击者可以注入会话cookie或HTML代码。这可能会进行类似的XSS(跨站点脚本)或会话固定漏洞。
解决方案
-修复的基本思路:
限制用户输入的CR和LF,或者对CR和LF字符正确编码后再输出,以防止注入自定义HTTP头。
-PHP语言的解决方案:
这种现象往往表现在带有参数传递的网页,只要合理的过滤好就OK啦,PHP语言的一些过滤方法:
$post = trim($post);
$post = strip_tags($post,""); //清除HTML等代码
$post = ereg_replace("\\t","",$post); //去掉制表符号
$post = ereg_replace("\\r\\n","",$post); //去掉回车换行符号
$post = ereg_replace("\\r","",$post); //去掉回车
$post = ereg_replace("\\n","",$post); //去掉换行
$post = ereg_replace(" ","",$post); //去掉空格
$post = ereg_replace("\'","",$post); //去掉单引号
以上来自360检测! |
|