[英]X-Frame-Options header on error response
我發現了與X-Frame-Options標頭相關的有趣的錯誤報告 。 但是我不明白這怎么可能是安全問題。
給出以下代碼作為漏洞證明:
require 'net/http'
require 'uri'
uri = URI.parse("https://play.google.com/#{"a" * 10000}")
@r = Net::HTTP.get_response uri
ret = @r.each_header {|x| puts x}
if ret["x-frame-options"]
puts ret["x-frame-options"]
else
puts "Missing x-frame-options!"
end
但是它試圖訪問無效的URL( https://play.google.com/aaaaaaaaa .. ),並返回錯誤頁面。 在響應中,缺少x-frame-options標頭。 我不知道這怎么可能是一個安全漏洞(因為它是無效的頁面,並且是錯誤響應)? 如何將其用於點擊劫持? 為什么對於錯誤響應也很重要,還應該設置此標頭?
您可以將以下行添加到.htaccess
Header always unset X-Frame-Options
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.