*TRACEメソッドの無効化 [#c58e0b3d]
#CONTENTS
**概要 [#g4ab78e8]
TRACEメソッドを使用したCross Site Tracingを防ぐため、TRACEメソッド自体を使用不可能にする。~
Apacheでは1.3.34以降、2.0.55以降、2.2以降でTRACEメソッドを禁止設定できる「TraceEnable」機能をサポートしている。

**TraceEnableの設定 [#w2be194f]
httpd.confに以下を追加し、apacheを再起動することで反映される。

 TraceEnable Off

**TRACEメソッドの確認 [#j590be37]
TRACEメソッドの有効/無効はOPTIONSメソッドを使用することで確認できる。

-手順~
telnetにて80番ポートへ接続する

 # telnet localhost 80
 Trying 127.0.0.1...
 Connected to localhost.localdomain (127.0.0.1).
 Escape character is '^]'.

OPTIONSメソッドにて有効なメソッドを確認

 OPTIONS / HTTP/1.0


-TRACEメソッドが有効な場合
 HTTP/1.1 200 OK
 Date: Thu, 01 May 2008 09:06:06 GMT
 Server: Apache
 Allow: GET,HEAD,POST,OPTIONS,TRACE
 Content-Length: 0
 Connection: close
 Content-Type: text/html
 
 Connection closed by foreign host.

-TRACEメソッドが無効な場合
 HTTP/1.1 200 OK
 Date: Thu, 01 May 2008 09:04:37 GMT
 Server: Apache
 Allow: GET,HEAD,POST,OPTIONS
 Content-Length: 0
 Connection: close
 Content-Type: text/html
 
 Connection closed by foreign host.

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS