[#49861] テンプレートシステムを安全に使う — "5.5" <5.5@...>
5.5 です。
9 messages
2014/07/07
[#49868] Rubyへの要望(願望) — MASAKI Yuhsuke <reasonset@...>
Ruby listの皆様、はじめまして、MASAKI Yuhsukeです。
14 messages
2014/07/12
[#49870] Re: Rubyへの要望(願望)
— Yukihiro Matsumoto <matz@...>
2014/07/12
まつもと ゆきひろです
[#49877] Rubyリファレンス chm版リミックス更新(2014年7月版) — Dice <tetradice@...>
こんにちは。Diceです。
21 messages
2014/07/13
[#49879] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Kazuhiro NISHIYAMA <zn@...>
2014/07/13
西山和広です。
[#49890] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Dice <tetradice@...>
2014/07/23
西山和広さん
[#49891] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Kazuhiro NISHIYAMA <zn@...>
2014/07/24
西山和広です。
[#49893] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Dice <tetradice@...>
2014/07/25
Diceです。
[#49894] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Dice <tetradice@...>
2014/07/26
Diceです。
[#49895] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Kazuhiro NISHIYAMA <zn@...>
2014/07/26
西山和広です。
[#49897] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Kazuhiro NISHIYAMA <zn@...>
2014/07/27
西山和広です。
[#49899] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Dice <tetradice@...>
2014/07/31
Diceです。
[#49906] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Dice <tetradice@...>
2014/08/10
Diceです。
[#49907] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Kazuhiro NISHIYAMA <zn@...>
2014/08/11
西山和広です。
[#49909] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Dice <tetradice@...>
2014/08/11
Diceです。
[#49919] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Dice <tetradice@...>
2014/08/17
Diceです。
[#49921] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Kazuhiro NISHIYAMA <zn@...>
2014/08/20
西山和広です。
[#49924] Re: Rubyリファレンス chm版リミックス更新(2014年7月版)
— Dice <tetradice@...>
2014/08/20
Diceです。
[ruby-list:49862] Re: テンプレートシステムを安全に使う
From:
Aiga Matsuo <mtaiga@...>
Date:
2014-07-07 04:48:35 UTC
List:
ruby-list #49862
松尾です。
数年前に同じような局面があって、Rubyのsafe levelを利用したことがあります。
エッセンスとしては下記のようなコードを書きました。。
require 'erb'
@erb = ERB.new('<%= IO.read("/etc/passwd") %>')
Thread.start do
$SAFE = 3
print @erb.result(binding) # => SecurityError
end.join
最近のRubyだと$SAFE=4がobsoleteになったので3にしていますがsandboxとしてそれなりに動作します。
$SAFE=4がなぜ排除されたのかあたりの事情を知らないのでこの辺りは突っ込んで調べておいたほうが良さそうですが。
--
Aiga Matsuo