Refused to execute a JavaScript script. Source code of script found within request.
在 Chrome上发布包含域名称的数据后出现错误(另请注意任一页面上都缺少 javascript)。
<form action="/badpage2.html" method="post">
<input type="hidden" name="name" value="href=%22http://www.w3.org/%22"/>
<input type="submit" name="submit"/>
</form>
<!DOCTYPE html>
<html>
<head>
<base href="http://www.w3.org/"/>
</head>
<body>
<img src="Icons/w3c_home" alt="">
</body>
</html>
如果你直接去badpage2.html
图像会显示,但如果你通过 去它badpage1.html
,图像将不会显示(基本标签不起作用)。
这是 Chrome XSS 检测中的错误吗?如果不是,我将如何绕过这个?仅仅为了绕过这个过滤器而对发布的数据进行编码似乎很愚蠢。
编辑:
就我而言,发送的帖子值是更新页面的部分内容。如果它包含恰好包含在(如本示例中那样)中使用的域名,则会出现问题<base>
,它将触发禁用<base>
标签的 XSS 检测。