【发布时间】:2021-10-17 01:17:07
【问题描述】:
x-frame-options 标头已确认设置为 SAMEORIGIN,但在创建简单的本地 HTML 文件时,例如
<html>
<head>
<title>Clickjack test page</title>
</head>
<body>
<p>Website is vulnerable to clickjacking!</p>
<iframe src="http://www.yoursite.com/sensitive-page" width="500" height="500">
</iframe>
</body>
</html>
并尝试嵌入目标页面,我可以毫无问题地这样做。
这可能是什么原因造成的?
谢谢
【问题讨论】:
-
您拥有该网站吗?标签“SAMEORIGIN”将允许来自自身的 iframe 请求。因此,如果 google.com 有一个 iframe 到 google.com,并且标题为“SAMEORIGIN”,那么请求就会顺利通过。
标签: html iframe web-applications header x-frame-options