[#41531] [Bug #3385] ext/dbm: accept various version of db — Takahiro Kambe <redmine@...>
Bug #3385: ext/dbm: accept various version of db
2010年6月3日23:38 Takahiro Kambe <redmine@ruby-lang.org>:
2011年11月12日8:14 Tanaka Akira <akr@fsij.org>:
[#41536] RUBY_DEBUG=gc_stress [FATAL] failed to allocate memory — Tanaka Akira <akr@...>
コンパイル時に RUBY_DEBUG_ENV というマクロを定義しておくと、
[#41543] [Bug #3398] 1.9.2 SEGV during test-all — Yuki Sonoda <redmine@...>
Bug #3398: 1.9.2 SEGV during test-all
[#41597] [Bug #3433] Error that occurs by BasicSocket#sendmsg — Masaya Tarui <redmine@...>
Bug #3433: Error that occurs by BasicSocket#sendmsg
[#41600] 質問・提案:cgi.rbの後継となるライブラリについて — Dice <tetradice@...>
Diceです。cgi.rbの後継ライブラリについて質問させてください。
藤岡です。
かくたにです。
藤岡さん、かくたにさん、返信ありがとうございます。
藤岡です。
Diceです。藤岡さん、返信ありがとうございます。
[#41610] [Bug #3443] requireが遅くなる — Yusuke Endoh <redmine@...>
Bug #3443: requireが遅くなる
[#41623] [Feature:trunk] argument delegation — Nobuyoshi Nakada <nobu@...>
なかだです。
遠藤です。
まつもと ゆきひろです
前田です。
[#41672] [Bug #3463] 1.9.2-preview3 で [BUG] gc_sweep(): unknown data type 0x0 — Tomoyuki Chikanaga <redmine@...>
チケット #3463 が更新されました。 (by Tomoyuki Chikanaga)
[#41674] [Bug #3464] win32ole failure load TYPELIB on mswin64 vista — sakiyama shin <redmine@...>
Bug #3464: win32ole failure load TYPELIB on mswin64 vista
[#41702] WIN32OLE_METHOD offset_vtbl — kuwamoto shintaro <beuniv@...>
こんばんわ
助田です。
こんにちは、なかむら(う)です。
助田です。
artonです。
2010/6/24 arton <artonx@yahoo.co.jp>:
[#41705] [Bug #3471][Rejected] ./miniruby sample/test.rbで1NotOK — Shyouhei Urabe <redmine@...>
チケット #3471 が更新されました。 (by Shyouhei Urabe)
2010年6月24日16:53 Shyouhei Urabe <redmine@ruby-lang.org>:
[#41711] [Bug #3473] make clear-installed-list — Usaku NAKAMURA <redmine@...>
Bug #3473: make clear-installed-list
[#41730] (ruby/tk) ruby_1_9_2 への backport — Hidetoshi NAGAI <nagai@...>
永井@知能.九工大です.
[#41752] [Bug #3490][Assigned] test_pack_utf8 failure on mswin64 — Yusuke Endoh <redmine@...>
チケット #3490 が更新されました。 (by Yusuke Endoh)
[#41760] Hash[] の引数が Array の場合の振る舞い — とみたまさひろ <tommy@...>
とみたです。
[ruby-dev:41632] Re: [Bug #3345] webrick test failure on Windows(?)
遠藤です。
2010年6月16日9:45 U.Nakamura <usa@garbagecollect.jp>:
>> 担当者 Usaku NAKAMURAにセット
>
> え、なんで?
> 報告したら担当しないといけないの?
報告者だからではなく、windows のプラットフォームメンテナということで
担当者にさせてもらいました。メンテナがいないライブラリの、プラット
フォーム特有の問題はプラットフォームメンテナに見てもらうしかないかな
と思って。
見たくないということでしたら、WONTFIX と判断する権限はあると思います。
>> prevent_directory_traversal の問題を正確に理解していないのですが、
>> 問題がおきるのが Windows だけで、\\ の扱いだけの問題だとしたら、
>> File.expand_path を使わず gsub で処理するといいのではないでしょう
>> か。
>
> 残念ながら \\ の扱いだけの問題ではないので...
> 具体的には、短いファイル名形式を利用したアクセスや、NTFSデー
> タストリームの主ストリーム明示指定アクセスなどによるアクセス
> 制御回避を、File.expand_pathの正規化処理を利用して排除してい
> ます。
> File.expand_pathが行っている正規化処理と同等の処理を全部ここ
> に並べるのはさすがにちょっと。
File.expand_path は絶対パスに変換するメソッドであって、正規化に使う
のは筋違いではないかという気がします。
trailing_pathsep? の処理が必要なことが傍証?
筋がどうこう言ってても security issue はしょうがないのでしょうがない
のですが、じゃあこういうパッチはどうでしょうか。
windows では試していませんが。
diff --git a/lib/webrick/httpservlet/filehandler.rb
b/lib/webrick/httpservlet/filehandler.rb
index 32c1965..4887903 100644
--- a/lib/webrick/httpservlet/filehandler.rb
+++ b/lib/webrick/httpservlet/filehandler.rb
@@ -214,16 +214,18 @@ module WEBrick
# character in URI notation. So the value of path_info should be
# normalize before accessing to the filesystem.
+ path = req.path_info.dup.force_encoding(Encoding.find("filesystem"))
if trailing_pathsep?(req.path_info)
# File.expand_path removes the trailing path separator.
# Adding a character is a workaround to save it.
# File.expand_path("/aaa/") #=> "/aaa"
# File.expand_path("/aaa/" + "x") #=> "/aaa/x"
- expanded = File.expand_path(req.path_info + "x")
+ expanded = File.expand_path(path + "x")
expanded.chop! # remove trailing "x"
else
- expanded = File.expand_path(req.path_info)
+ expanded = File.expand_path(path)
end
+ expanded.force_encoding(req.path_info.encoding)
req.path_info = expanded
end
--
Yusuke Endoh <mame@tsg.ne.jp>