<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1>歴史</h1><section><h1>IE8</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <cite xml:lang="en">IE8 Security Part V: Comprehensive Protection - IEBlog - Site Home - MSDN Blogs</cite> (<time>2012-11-18 01:13:58 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx">http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx</anchor-external></li></ul></refs></section></section><section><h1>例</h1><figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <pre class="HTTP example code">HTTP/1.1 200 OK 
Content-Length: 238 
Content-Type: text/html 
X-Download-Options: noopen 
Content-Disposition: attachment; filename=untrustedfile.html 
</pre></p><p><src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;1</anchor-internal></src></p></figure></section><section><h1>関連</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> 類似した機能として、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">IE6</anchor> で <code class="HTML" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DownloadOptions</anchor></code> が既に存在していました。</p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <cite xml:lang="ja">ファイルを直接開くのを禁止してセキュリティ向上 (X-Download-Options) - 理系学生日記</cite>
(<time>2016-11-09 08:23:53 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://kiririmode.hatenablog.jp/entry/20161107/1478523100">http://kiririmode.hatenablog.jp/entry/20161107/1478523100</anchor-external></figcaption><blockquote><p>IE では、ファイルをローカルに(明示的に)保存することなく開くという機能があります。ダウンロードリンクをクリックすると出てくるダイアログの「開く」ボタンを押下したときに働く機能ですね。</p><p>実はこの機能でファイルを開いた場合、そのファイルの内容はダウンロード元のウェブサイトのコンテキストで実行されるらしいです。悪意のあるスクリプトなんかをこの方法で開いてしまうと、インジェクションなんかが可能になるってことですね。 これを防ぐためのレスポンスヘッダが存在していて、それが</p><p>X-Download-Options: noopen</p><p>というレスポンスヘッダです。このヘッダをレスポンスに付与しておくと、ユーザは当該のファイルを直接「開く」ことができなくなり、明示的にローカルにダウンロードする他なくなります。 </p></blockquote></figure><ul><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> 
<cite xml:lang="en">北京市交通委员会</cite>, <time>2025-03-06T06:27:17.000Z</time>, <time>2025-05-23T10:58:27.622Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://jtw.beijing.gov.cn/xxgk/czxzj/202409/t20240903_3788312.html">https://jtw.beijing.gov.cn/xxgk/czxzj/202409/t20240903_3788312.html</anchor-external><ul><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://jtw.beijing.gov.cn/xxgk/czxzj/202409/P020241212524044343049.zip">https://jtw.beijing.gov.cn/xxgk/czxzj/202409/P020241212524044343049.zip</anchor-external></li></ul></li></ul><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;6</anchor-internal></p><pre class="HTTP code">X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: value
Referrer-Policy: value
X-Permitted-Cross-Domain-Policies: value
X-Download-Options: value
Accept-Ranges: bytes
X-Via-JSL: badc901,-
Cache-Control: max-age=10800
Expires: Fri, 23 May 2025 13:58:40 GMT
X-Cache: miss</pre></section></body></html>