Forums: Open Discussion (Thread #32552)

Tomcat6.0.33以降でのgetRequestURIの実装変更の影響ni (2012-07-24 23:07 by Anonymous #64742)

Tomcat6.0.33以降及び7でTERASOLUNAを利用している場合に注意が必要な点を発見しました。

上記バージョンでは、ServletRequest.getRequestURI()の結果に
pathParameter(;jsessionid=xxxようなパラメタ)が含まれるように動作が変更されました。

http://tomcat.10.n6.nabble.com/Path-parameters-and-getRequestURI-td4377159.html

その影響でTERASOLUNAのRequestUtil.getPathInfo()は
/context/FNXXXX/OPXXXXXXBL.do;test=test
というリクエストに対して
/FNXXXX/OPXXXXXXBL.do
ではなく
/FNXXXX/OPXXXXXXBL.do;test=test
という文字列を返すようになりました。

TERASOLUNAの提供するサーブレットフィルタの中では
RequestUtil.getPathInfo()は
このpathParameterが含まれないことを前提としてロジックが組まれているようです。

例えば「.jsp」をExtentionFilterで直接アクセス禁止にしている場合
URLに「~hoge.jsp;x=avoidCheck」と指定することで、
ExtentionFilterによるチェックが回避できてしまいます。

同様にTERASOLUNA付属の機能サンプルのAuthorizationController実装では
「/authorization/authorizationForward.do」
をアクセス権限判定対象として指定していますが
URLに「/authorization/authorizationForward.do;x=avoidCheck」と指定することで、
アクセス権限チェックを回避できてしまいます。

参考までに、Spring Securityにも同じ原因の不具合があったようです。
http://www.springsource.com/security/cve-2010-3700

Reply to #64742×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: Tomcat6.0.33以降でのgetRequestURIの実装変更の影響ni (2012-07-25 18:43 by kominen #64757)

情報共有ありがとうございます。

ご指摘いただいた内容について確認の上、対処方法を検討いたします。
他にも同様の情報がありました場合は、同様に共有いただけますと幸いです。

取り急ぎ以上です。今後ともよろしくお願いいたします。
Reply to #64742

Reply to #64757×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login