go.php?url=http是跳转页面,360提示响应拆分漏洞怎么修复
go.php?url=http是跳转页面,360提示响应拆分漏洞怎么修复go.php内容如下:<?phpheader("location:".$_GET["url"]);...
go.php?url=http是跳转页面,360提示响应拆分漏洞怎么修复
go.php内容如下:
<?php header("location:".$_GET["url"]); ?>
怎么把下面的修复代码添加到go.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); //去掉单引号 展开
go.php内容如下:
<?php header("location:".$_GET["url"]); ?>
怎么把下面的修复代码添加到go.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); //去掉单引号 展开
1个回答
展开全部
$post=$_GET[缉常光端叱得癸全含户"url"];
//那一串代码
header("location:".$post);
//那一串代码
header("location:".$post);
追问
能不能提供下完整的代码啊?谢谢。。
追答
$post=$_GET["url"];
$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); //去掉单引号
header("location:".$post);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询