From: Kazuhiko <kaz...@fd...> - 2009-07-31 08:11:35
|
Kazuhiko wrote: > TADA Tadashi wrote: >> ちょっと忙しいので軽くレスしておくと、最近のrubyは$SAFEの仕様が >> 変わったためか、tDiaryがセキュアモードで動いていません。かなり面倒 >> そうなので、本腰入れて調べる時間が取れるまで放置中です......。 >> >> どのくらい遡れば動くのか、誰か調べてくれるとうれしいです(^^; > > ChangeLogであたりをつけつつ探索した結果、 > > http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=16081 > Author: knu > Date: Sat Apr 19 11:11:25 2008 UTC (15 months, 1 week ago) > Log Message: > > * array.c (rb_ary_equal, rb_ary_eql, rb_ary_hash, rb_ary_cmp): > Make Array#eql?, #hash, #== and #<=> use rb_exec_recursive() and > handle recursive data properly. > > * hash.c (hash_equal, rb_hash_hash): Make Hash#eql?, #hash and #== > use rb_exec_recursive() and handle recursive data properly. > > 以降、このエラーが出ます。って、1年以上前なのかー。 ここでのsort対象は、 [ [2, "http://..."], [1, "http://..."] ] みたいなArrayなのですが(リファラの方はtaintedだけど、これをuntaintして も状況は変わらず)、これをsortする際に、'handle recursive data properly' の変更のためにSecurity Errorが出ているようです。 そこで、添付のようなdirty hackでwork aroundになるのを確認しました。 もちろん、本来はruby_1_8側でどうにかなって欲しい問題ではありますが、現状 は「いろんな脆弱性のある昔のruby-1.8」でないとセキュアモードが動かないわ けで、それはそれで嬉しくないでしょうから、このパッチをコミットしてもいい でしょうか? かずひこ |