From: Kazuhiro N. <zn...@mb...> - 2003-09-30 22:49:57
|
西山和広です。 In <43B...@mp...> On Mon, 29 Sep 2003 23:50:27 +0900 mput <ro...@mp...> wrote: > > 01sp.rbの改造中に、@secure==trueな日記でプラグインがクッキーを追加しよう > > とするとセキュリティエラー > > tdiary.rb:723:in `<<': Insecure: can't modify array (SecurityError) > > になるという現象にでくわしました。 > > むかしうちの日記(@secure=true)で whatsnew が動かない!と思ってこちらの > ML で質問したのですが > http://www.tdiary.net/archive/devel/msg00689.html > 結局「 secure モードで @cookies を解放するのは危険すぎる」という結論 > だったように記憶しています。 それなら def add_cookie( cookie ) @cookies << cookie rescue SecurityError raise SecurityError, "can't use cookies in plugin when secure mode" end という感じでエラーメッセージを差し替えてしまえばいいのでは ないでしょうか? -- |ZnZ(ゼット エヌ ゼット) |西山和広(Kazuhiro NISHIYAMA) |