$B%;%-%e%j%F%#%b%G%k$N%I%-%e%a%s%H(B

e$BA0ED$G$9!#e(B

e$BEDCf$5$s$K2q$&[email protected]$o$l$k$N$G!“e(B$SAFEe$B$^$o$j$N%I%-%e%a%s%H$NC!$-Bf$re(B
e$B:n$C$F$$^$7$?!#e(B
e$B6X;
$5$l$kA`:n$N0lMw$O%j%U%!%l%s%9%^%K%e%”%k$+$i<h$C$FMh$^$7$?$N$G!"<BAu$H$Oe(B
e$BP*N%$,$"$k$+$b$7$l$^$;$s!#e(B
e$B$H$j$"$($:$O!"C!$-Bf$H$$$&$3$H$G!D!#e(B

= Rubye$B%;%-%e%j%F%#%b%G%ke(B

Rubye$B$N%;%-%e%j%F%#%b%G%k$O!"0J2<$Ne(B2e$B$D$N0[$J$kL\E*$N$?$a$KDs6!$5$l$F$$$k!#e(B

: e$B30It$N;q8;$NJ]8ne(B

e$B%W%m%0%i%`30It$+$i$NF~NO%G!<%?$K$h$C$F!"%W%m%0%i%`30It$N;q8;$KBP$9e(B
e$B$k!"%W%m%0%i%^$N0U?^$KH?$7$?A`:n$,9T$o$l$k$3$H$rKI$0$?$a!#$?$H$($P!"e(B
Webe$B%"%W%j%1!<%7%g%[email protected]$J%/%(%jJ8;zNs$,M?$($i$l$?>l9g$K!"$=e(B
e$B$NJ8;zNs$r85$K%U%!%$%kA`:n$d30It%3%^%s%I$N<B9T$J$I$NA`:n$,9T$o$l$ke(B
e$B$h$&[email protected]$+$i!"%W%m%0%i%`30It$N;q8;$rJ]8n$9$k$3$H$rA[Dj$7$F$$$k!#e(B

: e$B?.Mj$5$l$F$$$J$$%3!<%I$N<B9Te(B

e$B?.Mj$5$l$F$$$J$$%3!<%I$r!"B>$N%G!<%?$+$i3VN%$5$l$?4D6-e(B(e$B%5%s%I%\%C%/e(B
e$B%9e(B)e$BFb$G0BA4$K<B9T$9$k$?$a!#e(B
[email protected]$7!"8=:_$Ne(BRubye$B$N<BAu$G$O!"$3$N5!G=$O40A4$G$O$J$$!#>\:Y$K$D$$$Fe(B
e$B$O!V%;!<%U%l%Y%ke([email protected]!W$r;2>H!#e(B

== e$B%*%V%8%’%/%H$N%U%i%0e(B

Rubye$B$N%*%V%8%’%/%H$O!"e(Btaintede$B$He(Buntrustede$B$H8F$P$l$ke(B2e$B$D$N%U%i%0$r;}$D!#e(B

=== tainted

taintede$B$O!"%%V%8%’%/%H$,[email protected]$5$l$F$$$k$H$$$&>uBV$rI=$9%U%i%0$G$"$j!"30e(B
e$BIt$N;q8;$NJ]8n$N$?$a$KMxMQ$5$l$k!#e(Btaintede$B%U%i%0$,@_Dj$5$l$?%
%V%8%’%/%He(B
[email protected]$5$l$?%%V%8%’%/%H!W!"@_Dj$5$l$F$$$J$$%%V%8%’%/%[email protected]$5$le(B
e$B$F$$$J$$!W$H8F$V!#e(B

e$B$3$N%U%i%0$O0J2<$N$h$&$J>[email protected]_Dj$5$l$k!#e(B

e$B%*%V%8%’%/%H$,!"30It$+$i$NF~NOe(B(IOe$B!&%3%^%s%I%i%$%s0z?t!&4D6-JQ?t$J$Ie(B)
[email protected]@.$5$l$?>l9g!#4D6-JQ?te([email protected]$1$ONc30$G!"CM$K4m81$J%Q%9$r4^$`e(B
e$B>l9g$N$[email protected]$5$l$k!#$3$3$G$O4m81$J%Q%9$H$OC/$G$bJQ99!&=q$-9~$$,2DG=e(B
e$B$J%Q%9$r$$$&!#%k!<%H%G%#%l%/%H%j$+$i3,AX$,=gHV$K%A%’%C%/$5$l!“0l2U=je(B
e$B$G$bC/$G$bJQ992DG=$J8D=j$,$”$l$P$=$N%Q%9$O4m81$H$_$J$5$l$k!#e(B

e$B$^$?!"e(BObject#untainte$B%a%=%C%I$K$h$C$F%U%i%0$r=|5n$9$k$3$H$,$G$-$k!#e(B

taintede$B%U%i%0$,@_Dj$5$l$F$$$k$+$I$&$+$O!“e(BObject#tainted?e$B%a%=%C%I$K$h$Ce(B
e$B$F8!::$9$k$3$H$,$G$-$k!#e(BObject#tainted?e$B$O!”%U%i%0$,@_Dj$5$l$F$$$k>l9g$Ke(B
truee$B$r!"@_Dj$5$l$F$$$J$$>l9g$Ke(Bfalsee$B$rJV$9!#e(B

=== untrusted

untrustede$B$O!"%%V%8%’%/%H$,?.Mj$5$l$F$$$J$$%3!<%[email protected]@.$5$l$?$H$$$&>ue(B
e$BBV$rI=$9%U%i%0$G$"$j!"?.Mj$5$l$F$$$J$$%3!<%I$r%5%s%I%%C%/%9Fb$G0BA4$K<B9Te(B
e$B$9$k$?$a$KMxMQ$5$l$k!#e(Buntrustede$B%U%i%0$,@_Dj$5$l$?%
%V%8%’%/%H$r!V?.Mj$5e(B
e$B$l$F$$$J$$%%V%8%’%/%H!W!"@_Dj$5$l$F$$$J$$%%V%8%’%/%H$r!V?.Mj$5$l$?%*e(B
e$B%V%8%’%/%H!W$H8F$V!#e(B

e$B$3$N%U%i%0$O0J2<$N$h$&$J>[email protected]_Dj$5$l$k!#e(B

e$B%%V%8%’%/%H$,!"B>$N?.Mj$5$l$F$$$J$$%%V%8%’%/%[email protected]@.$5$l$?>l9ge(B

e$B$^$?!"e(BObject#truste$B%a%=%C%I$K$h$C$F%U%i%0$r=|5n$9$k$3$H$,$G$-$k!#e(B

untrustede$B%U%i%0$,@_Dj$5$l$F$$$k$+$I$&$+$O!“e(BObject#untrusted?e$B%a%=%C%I$Ke(B
e$B$h$C$F8!::$9$k$3$H$,$G$-$k!#e(BObject#untrusted?e$B$O!”%U%i%0$,@_Dj$5$l$F$$$ke(B
e$B>l9g$Ke(Btruee$B$r!"@_Dj$5$l$F$$$J$$>l9g$Ke(Bfalsee$B$rJV$9!#e(B

== e$B%;!<%U%l%Y%ke(B

Rubye$B$N%;%-%e%j%F%#%A%’%C%/5!G=$O!"%;!<%U%l%Y%[email protected])8f$5$l$k!#%;!<e(B
e$B%U%l%Y%k$O%9%l%C%I%m!<%+%kJQ?te([email protected]_Dj$9$k!#%9%l%C%I$,:[email protected]$5$l$?>l9ge(B
e$B$O!"?F%9%l%C%I$Ne(B$SAFEe$B$NCM$r0z$-7Q$0!#e(B

e$B%G%U%)%k%H$G$O!"%;!<%U%l%Y%k$Oe(B0e$B$G$"$k!#%;!<%U%l%Y%k$O!"e(BRubye$B$N5/F0%*%W%7%ge(B
e$B%se([email protected]_Dj$9$k$3$H$,$G$-$k!#e(B

$SAFE e$B$NCM$r8=:_$NCM$h$j>.$5$/JQ99$9$k;v$O$G$-$J$$!#e(B

$ ruby -e ‘$SAFE = 1; $SAFE = 0’
-e:1:in `’: tried to downgrade safe level from 1 to 0
(SecurityError)

Proce$B%%V%8%’%/%H$N%V%m%C%/Fb$Ge(B$SAFEe$B$NCM$,@_Dj$5$l$?>l9g$O!"e(BProce$B%%V%8%'e(B
e$B%/%H$N<B9T=*N;8e$Ke(B$SAFEe$B$NCM$O<B9TA0$N>uBV$KLa$5$l$k!#e(B

$ ruby -e ‘lambda { $SAFE = 1 }.call; p $SAFE’
0

e$B3F%;!<%U%l%Y%k$G$O!"0J2<$N$h$&$J%A%’%C%/$,9T$o$l!"6X;_$5$l$?A`:n$,<B9Te(B
e$B$5$l$?>l9g$K$Oe(BSecurityErrore$BNc30$,H/@8$9$k!#e(B

=== e$B%l%Y%ke(B0

e$B%G%U%)%k%H$N%;!<%U%l%Y%k!#e(B

==== e$B6X;_$5$l$kA`:ne(B

e$B%l%Y%ke(B0e$B$G$O!"6X;_$5$l$kA`:n$O2?$b$J$$!#e(B

=== e$B%l%Y%ke(B1

e$B%l%Y%ke(B1e$B$G$O!"%W%m%0%i%30It$+$i$NF~NO%G!<%?$K$h$C$F!"%W%m%0%i%30It$N;qe(B
e$B8;$KBP$9$k!"%W%m%0%i%^$N0U?^$KH?$7$?A`:n$,9T$o$l$k$3$H$rKI$0$?$a!#e(B

==== e$B6X;_$5$l$kA`:ne(B

  • [email protected]$5$l$?J8;zNs$r0z?t$H$7$?0J2<$NA`:ne(B
    • Dir, IO, Filee$B!“e(BFileTeste$B$N%/%i%9%a%=%C%I!”%a%=%C%Ie(B

      $ ruby -e ‘$SAFE = 1; open(ARGV[0])’ hoge
      -e:1:in initialize': Insecure operation - initialize (SecurityError) from -e:1:inopen’
      from -e:1

    • e$B%U%!%$%k%F%9%H1i;;;R$N;HMQ!"%U%!%$%k$N99?7;~9oHf3Se(B

    • e$B30It%3%^%s%I<B9Te(B(system, exec, ``)

    • eval (e$B%l%Y%ke([email protected]@$b;2>He(B)

e$B%H%C%W%l%Y%k$X$Ne(Bload(e$BBhFs0z?t$r;XDj$7$F%i%C%W$9$l$P<B9T2DG=e(B)

  • require
  • trap
  • e$B30It$N;q8;$KBP$9$k$=$NB>$NA`:ne(B

e$B30It%3%^%s%I<B9Te(B(e$B4D6-JQ?te(BPATHe$B$K4m81$J%Q%9$r4^$s$G$$$k>l9g$N$_e(B)

=== e$B%l%Y%ke(B2

==== e$B6X;_$5$l$kA`:ne(B

e$B%l%Y%ke(B1e$B$G6X;$5$l$kA:n$K2C$($F!"0J2<$NA:n$,6X;$5$l$k!#e(B

  • Dir.chdir Dir.chroot Dir.mkdir Dir.rmdir
  • File.chown File.chmod File.umask File.truncate File#lstat File#chmod
    File#chown File#delete File#unlink File#truncate File#flock
    e$B$*$h$Se(BFileTeste$B%b%8%e!<%k$N%a%=%C%Ie(B
  • IO#ioctl, IO#fcntl
  • Process.fork Process.setpgid Process.setsid Process.setpriority
    Process.egid= Process.kill
  • e$B4m81$J%Q%9$+$i$Ne(Bload
  • [email protected]$5$l$?J8;zNs$r0z?t$K$7$F$Ne(Bload(e$B%i%C%W$5$l$F$$$F$be(B)
  • syscall
  • exit!
  • trap

=== e$B%l%Y%ke(B3

e$B%l%Y%ke(B3e$B$O!"?.Mj$5$l$F$$$J$$%3!<%I$r<B9T$9$k$?$a$N4D6-$r:[email protected]$9$k$?$a$KMxe(B
e$BMQ$5$l$k!#%l%Y%ke([email protected]@.$5$l$k%%V%8%’%/%H$K$O!"e(Btaintede$B$$h$Se(Buntrustede$B%Ue(B
e$B%i%0$,@_Dj$5$l$k!#e(B

==== e$B6X;_$5$l$kA`:ne(B

e$B%l%Y%ke(B2e$B$G6X;$5$l$kA:n$K2C$($F!"0J2<$NA:n$,6X;$5$l$k!#e(B

  • Object#untaint
  • Object#trust

=== e$B%l%Y%ke(B4

e$B%l%Y%ke(B4e$B$O!"?.Mj$5$l$F$$$J$$%3!<%I$r<B9T$9$k$?$a$KMxMQ$5$l$k!#[email protected]$7!"$3e(B
e$B$N5!G=$O40A4$G$O$J$$!#>:Y$K$D$$$F$O!"!V%;!<%U%l%Y%ke([email protected]!W$r;2>H!#e(B

e$B$3$N%l%Y%k$G$O!"4m81$JA`:n$,$9$Y$F6X;$5$l$F$$$k$?$a!"%l%Y%ke(B3e$B$G$O6X;$5e(B
[email protected]$5$l$?J8;zNs$Ne(Bevale$B!W$,5v2D$5$l$F$$$k!#e(B

==== e$B6X;_$5$l$kA`:ne(B

e$B%l%Y%ke(B3e$B$G6X;$5$l$kA:ne(B(evale$B$O=|$/e(B)e$B$K2C$($F!"0J2<$NA:n$,6X;$5$l$k!#e(B

  • Object#taint
  • Object#untrust
  • e$B%H%C%W%l%Y%k$NDj5A$NJQ99e(B(autoload, load, include)
  • e$B4{B8$N%a%=%C%I$N:FDj5Ae(B
  • Objecte$B%/%i%9$NDj5A$NJQ99e(B
  • e$B?.Mj$5$l$?%/%i%9$d%b%8%e!<%k$NDj5A$NJQ99e(B
    e$B$*$h$S%/%i%9JQ?t$NJQ99e(B
  • e$B?.Mj$5$l$?%*%V%8%’%/%H$N>uBV$NJQ99e(B
  • e$B%0%m!<%P%kJQ?t$NJQ99e(B
  • e$B?.Mj$5$l$?e(BIOe$B$de(BFilee$B$r;HMQ$9$k=hM}e(B
  • IOe$B$X$N=PNOe(B
  • e$B%W%m%0%i%`$N=*N;e(B(exit, abort) (e$B$J$*e(Bout of
    memorye$B$G$be(Bfatale$B$K$J$i$J$$e(B)
  • e$BB>$N%9%l%C%I$K1F6A$,=P$ke(BThreade$B%/%i%9$NA`:ne(B
    e$B$*$h$SB>$N%9%l%C%I$Ne(BThread#[]
  • ObjectSpace._id2ref
  • ObjectSpace.each_object
  • e$B4D6-JQ?t$NJQ99e(B
  • srand
  • e$B30It$N;q8;$KBP$9$k$=$NB>$NA`:ne(B

== untainte$B$K$D$$$F$N;X?Ke(B

=== e$B%"%W%j%1!<%7%g%s$K$*$1$ke(Buntaint

e$B%;!<%U%l%Y%ke(B1e$B0J>e$G!“[email protected]$5$l$?%*%V%8%’%/%H$K$h$C$F30It$N;q8;$NA`:n$r9Te(B
e$B$&I,MW$,$”$k>l9g$K$O!“e(BObject#untainte$B$K$h$C$Fe(Btaintede$B%U%i%0$r=|5n$9$kI,MWe(B
e$B$,$”$k!#e(B

[email protected]$7!“e(Buntainte$B$r9T$&A0$K$O!”$=$N%%V%8%’%/%H$rMxMQ$7$FEv3:A`:n$r9T$C$Fe(B
e$B$bLdBj$J$$$3$H$N%A%’%C%/$r%
%V%8%’%/%H$KBP$7$F9T$&$Y$-$G$"$k!#e(B

=== e$B%i%$%V%i%j$K$*$1$ke(Buntaint

e$B%a%=%C%I$N0z?t$J$I$G%f!<%6$+$iM?$($i$l$?%G!<%?$,[email protected]$5$l$?%*%V%8%’%/%He(B
e$B$G$J$$>l9g$O!"%f!<%6$,;XDj$7$?A`:n$N<B9T$r0U?^$7$F$$$k$HH=CG$7!"=hM}$Ne(B
e$B<B9T$KI,MW$JFbIt%G!<%?$Ne(Buntainte$B$O!"%i%$%V%i%jB&$G9T$&$3$H$,K>$^$7$$!#e(B

e$B%i%$%V%i%[email protected]@.$5$l$k%*%V%8%’%/%H$K$D$$$F$O!"%i%$%V%i%j$N%f!<%6B&e(B
e$B$+$ie(Buntainte$B$9$k$3$H$,$G$-$J$$$?$a!">e5-$N$h$&$Je(Buntainte$B$r9T$o$J$$$H!"$=e(B
e$B$N%i%$%V%i%j$r%;!<%U%l%Y%ke(B1e$B0J>e$G$OMxMQ$9$k$3$H$,$G$-$J$$$?$a$G$"$k!#e(B

== e$B3HD%%i%$%V%i%j$N:[email protected];X?Ke(B

e$B3HD%%i%$%V%i%j$N:[email protected]$N:]$K$O!“0J2<[email protected]$KCm0U$9$kI,MW$,$”$k!#e(B

=== e$B%;!<%U%l%Y%ke(B4e$B$K$*$1$kA`:n$N6X;_e(B

e$B%;!<%U%l%Y%ke(B4e$B$G$O!"30It$N;q8;$KBP$9$kA:n$r6X;_$9$Y$-$G$"$k!#A:n$N6X;_e(B
e$B$K$O!"e(Brb_secure()e$B$rMxMQ$9$k!#e(B

static VALUE
readline_readline(int argc, VALUE *argv, VALUE self)
{

rb_secure(4);

=== e$B30It$+$i$NF~NO$Ne(Btaint

e$B%G!<%?%Y!<%9$+$i$N%G!<%?$NFI$9~$;~$J$I!“30It$+$i$NF~NO$r85$K%%V%8%'e(B
e$B%/%[email protected]@.$9$k>l9g$O!"@8@.$5$l$?%
%V%8%’%/%H$re(BOBJ_TAINT()e$B$K$h$je(Btainte$B$9e(B
e$B$Y$-$G$”$k!#e(B
e$BJ8;[email protected]@.;~$K$O!"D>@\e(BOBJ_TAINT()e$B$r8F$S=P$9Be$j$K!"e(B
rb_tainted_str_new()e$B$de(Brb_tainted_str_new_cstr()e$B$rMxMQ$9$k$3$H$b$G$-$k!#e(B

== e$B%;!<%U%l%Y%ke([email protected](B

e$B8=:_$N%;!<%U%l%Y%ke(B4e$B$N<BAu$O<!$N$h$&$JLdBj$r;}$C$F$*$j!"40A4$G$O$J$$!#e(B

e$BL58B%k!<%W$d%9%?%C%/%*!<%P!<%U%m!<$N8!=P$J$I$r9T$o$J$$$?$a!“e(BDoSe$B>uBV$,e(B
e$B0z$-5/[email protected]$,$”$k!#e(B
*
e$B3HD%%i%$%V%i%j$J$I$K$D$$$F$O!"%;!<%U%l%Y%k$N%A%’%C%/$r9T$C$F$$$J$$$be(B
e$B$N$,$"$k$?$a!“30It$N;q8;$KBP$9$kA`:n$r<[email protected]$,$”$k!#e(B

In article
[email protected],
Shugo M. [email protected] writes:

=== e$B%i%$%V%i%j$K$*$1$ke(Buntaint

e$B%a%=%C%I$N0z?t$J$I$G%f!<%6$+$iM?$($i$l$?%G!<%?$,[email protected]$5$l$?%*%V%8%’%/%He(B
e$B$G$J$$>l9g$O!"%f!<%6$,;XDj$7$?A`:n$N<B9T$r0U?^$7$F$$$k$HH=CG$7!"=hM}$Ne(B
e$B<B9T$KI,MW$JFbIt%G!<%?$Ne(Buntainte$B$O!"%i%$%V%i%jB&$G9T$&$3$H$,K>$^$7$$!#e(B

e$B%i%$%V%i%[email protected]@.$5$l$k%*%V%8%’%/%H$K$D$$$F$O!"%i%$%V%i%j$N%f!<%6B&e(B
e$B$+$ie(Buntainte$B$9$k$3$H$,$G$-$J$$$?$a!">e5-$N$h$&$Je(Buntainte$B$r9T$o$J$$$H!"$=e(B
e$B$N%i%$%V%i%j$r%;!<%U%l%Y%ke(B1e$B0J>e$G$OMxMQ$9$k$3$H$,$G$-$J$$$?$a$G$"$k!#e(B

[email protected][email protected]$He(B untaint e$B$7$F$b0BA4$+$I$&$+$I$&$d$C$FH=CG$7$?$ie(B
e$B$$$$$N$+$o$+$j$^$;$s$M$’!#e(B

e$BF0$+$J$+$C$?$i2?$b9M$($:$Ke(B untaint e$B$9$k$N$,@5$7$$$H$O$A$g$Ce(B
e$B$H;W$($^$;$s$7!#e(B

[email protected]$K$D$$$F2?$r9M$($F8!F$$9$l$P$$$$$N$+$H$$$&$H$3$m$,$o$+e(B
e$B$j$^$;$s!#e(B

[email protected]>;3OB9-$G$9!#e(B

At Sun, 19 Jul 2009 01:05:29 +0900,
Shugo M. wrote:

e$B$^$?!"e(BObject#truste$B%a%=%C%I$K$h$C$F%U%i%0$r=|5n$9$k$3$H$,$G$-$k!#e(B

untrustede$B%U%i%0$,@_Dj$5$l$F$$$k$+$I$&$+$O!“e(BObject#untrusted?e$B%a%=%C%I$Ke(B
e$B$h$C$F8!::$9$k$3$H$,$G$-$k!#e(BObject#untrusted?e$B$O!”%U%i%0$,@_Dj$5$l$F$$$ke(B
e$B>l9g$Ke(Btruee$B$r!"@_Dj$5$l$F$$$J$$>l9g$Ke(Bfalsee$B$rJV$9!#e(B

untrusted e$B$O%U%i%[email protected][email protected]$1$G!“e(B
e$B%U%i%0$,@_Dj$5$l$F$$$k$+$I$&$+$K$h$C$F2?$i$+$NF0:n$K1F6A$9$ke(B
e$B$b$N$G$O$J$$!”$H$$$&$3$H$J$N$G$7$g$&$+e(B?

e$B$=$&$$$&[email protected]$H$9$k$H!"$I$&$$$&;H$o$l$+$?$rA[Dj$7$F$$$ke(B
e$B%U%i%0$J$N$G$7$g$&$+e(B?

e$BA0ED$G$9!#e(B

2009/07/20 10:51 e$B$Ke(B Tanaka A.[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

[email protected][email protected]$He(B untaint e$B$7$F$b0BA4$+$I$&$+$I$&$d$C$FH=CG$7$?$ie(B
e$B$$$$$N$+$o$+$j$^$;$s$M$’!#e(B

e$BF0$+$J$+$C$?$i2?$b9M$($:$Ke(B untaint e$B$9$k$N$,@5$7$$$H$O$A$g$Ce(B
e$B$H;W$($^$;$s$7!#e(B

[email protected]$K$D$$$F2?$r9M$($F8!F$$9$l$P$$$$$N$+$H$$$&$H$3$m$,$o$+e(B
e$B$j$^$;$s!#e(B

e$B0JA0=q$$$?$3$H$N7+$jJV$7$K$J$j$^$9$,!"%;!<%U%l%Y%ke(B1e$B!Ae(B3e$B$Ne(Btainte$B5!9=$Oe(B
e$B$"$/$^$G$b%"%W%j%1!<%7%g%s%W%m%0%i%^$N%_%9$KBP$9$k%U%’!<%k%;!<%U5!9=e(B
e$B$G$"$j!“[email protected]$N3NG’$O%i%$%V%i%jB&$G$O$J$/%”%W%j%1!<%7%g%sB&[email protected][email protected]$He(B
e$B9M$($F$$$^$9!#e(B
e$B:#$N%;%-%e%j%F%#%b%G%k$G$O!"%"%W%j%1!<%7%g%s$+$iEO$5$l$?%*%V%8%’%/%H$,e(B
[email protected]$5$l$F$$$J$$>l9g$O!"%i%$%V%i%j$O%"%W%j%1!<%7%g%s$K;X<($5$l$?DL$j$Ke(B
e$BF0:n$9$k$3$H$,4|BT$5$l$F$$$k$h$&$K;W$$$^$9!#e(B

[email protected]_7W<T$N$^$D$b$H$5$s$K0c$&[email protected]$o$l$l$PJL$G$9$,!#e(B

e$BCfESH>C<[email protected][email protected]$o$l$l$P$=$&$+$b$7$l$^$;$s$,!"$^$:$O8=:[email protected]_7W$N0U?^e(B
[email protected]$K$7$?$$$H;W$$$^$9!#e(B
e$B$=$N>e$G!“JQ$($?J}$,$h$$!”$"$k$$$O$$$C$=$N$3$H$J$/$7$F$7$^$C$?J}$,$h$$!"e(B
[email protected]$r$7$?$$$G$9!#e(B

e$BA0ED$G$9!#e(B

2009/07/23 1:09 e$B$Ke(B Kazuhiro NISHIYAMA[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

untrusted e$B$O%U%i%[email protected][email protected]$1$G!“e(B
e$B%U%i%0$,@_Dj$5$l$F$$$k$+$I$&$+$K$h$C$F2?$i$+$NF0:n$K1F6A$9$ke(B
e$B$b$N$G$O$J$$!”$H$$$&$3$H$J$N$G$7$g$&$+e(B?

e$B0c$$$^$9!#e(B

e$B!V%;!<%U%l%Y%ke(B4e$B!W$N!V6X;_$5$l$kA:n!W$K5s$2$F$$$k0J2<$NA:n$N%A%’%C%/$Ke(B
e$BMxMQ$5$l$^$9!#e(B

e$BH4$1$,$"$k$+$b$7$l$^$;$s!#e(B

  • e$B?.Mj$5$l$?%/%i%9$d%b%8%e!<%k$NDj5A$NJQ99e(B
    e$B$*$h$S%/%i%9JQ?t$NJQ99e(B
  • e$B?.Mj$5$l$?%*%V%8%’%/%H$N>uBV$NJQ99e(B
  • e$B?.Mj$5$l$?e(BIOe$B$de(BFilee$B$r;HMQ$9$k=hM}e(B

e$B4pK\E*$K%;!<%U%l%Y%ke(B4e$B$G$O?.Mj$5$l$F$$$J$$%%V%8%’%/%He(B(untrustede$B%U%i%0e(B
e$B$,@_Dj$5$l$?%
%V%8%’%/%He(B)e$B$7$+JQ99$G$-$^$;$s!#e(B

e$B0JA0$O$3$l$,e(Btaintede$B%U%i%0$K$h$C$F%A%’%C%/$5$l$F$$$?$N$G!"%5%s%I%%C%/%9e(B
[email protected]@.$5$l$?%*%V%8%’%/%H$,$?$^$?$^e([email protected]$C$?>l9g$K!"$=$l$r=q$-JQe(B
e$B$($k$3$H$K$h$j!"%;!<%U%l%Y%ke(B4e$B$G6X;_$5$l$?A`:n$r<B9T$5$;$k$3$H$,$G$-$ke(B
[email protected]<[email protected]$,$$$/$D$bJs9p$5$l$^$7$?!#e(B
e$BEv=i$O0l$D$:$De(Bfreezee$B$9$kBP:v$,<h$i$l$^$7$?$,!"$-$j$,$J$$$N$G!"e(B
taintede$B$H$OJL$N%U%i%0$H$7$Fe(Buntrustede$B$rMQ0U$9$kJQ99$r;d$,9T$$$^$7$?!#e(B

[email protected]>;3OB9-$G$9!#e(B

At Thu, 23 Jul 2009 22:09:36 +0900,
Shugo M. wrote:

e$BA0ED$G$9!#e(B

2009/07/23 1:09 e$B$Ke(B Kazuhiro NISHIYAMA[email protected] e$B$5$s$O=q$-$^$7$?e(B:

untrusted e$B$O%U%i%[email protected][email protected]$1$G!“e(B
e$B%U%i%0$,@_Dj$5$l$F$$$k$+$I$&$+$K$h$C$F2?$i$+$NF0:n$K1F6A$9$ke(B
e$B$b$N$G$O$J$$!”$H$$$&$3$H$J$N$G$7$g$&$+e(B?

e$B0c$$$^$9!#e(B

untrust
e$B$G8!:w$7$F0c$$$r%A%’%C%/$7$F$$$?$i8+Mn$H$7$F$7$^$C$F$$$^$7$?!#e(B

e$B0JA0$O$3$l$,e(Btaintede$B%U%i%0$K$h$C$F%A%’%C%/$5$l$F$$$?$N$G!"%5%s%I%%C%/%9e(B
[email protected]@.$5$l$?%*%V%8%’%/%H$,$?$^$?$^e([email protected]$C$?>l9g$K!"$=$l$r=q$-JQe(B
e$B$($k$3$H$K$h$j!"%;!<%U%l%Y%ke(B4e$B$G6X;_$5$l$?A`:n$r<B9T$5$;$k$3$H$,$G$-$ke(B
[email protected]<[email protected]$,$$$/$D$bJs9p$5$l$^$7$?!#e(B
e$BEv=i$O0l$D$:$De(Bfreezee$B$9$kBP:v$,<h$i$l$^$7$?$,!"$-$j$,$J$$$N$G!"e(B
taintede$B$H$OJL$N%U%i%0$H$7$Fe(Buntrustede$B$rMQ0U$9$kJQ99$r;d$,9T$$$^$7$?!#e(B

tdiary-devel e$B$G$H$j$"$($:e(B 1.9 e$B$G$bF0$/$h$&$K$9$kJ}K!$H$7$Fe(B

class Object
def taint
super
untrust
end
end if respond_to?(:untrust)

e$B$H$$$&0F$r=P$7$F$7$^$$$^$7$?$,e(B(Objecte$B$KDj5A$7$F$$$k$N$Oe(B
Kernele$B$GDj5A$5$l$F$$$k85$Ne(Btainte$B$r4JC1$K8F$V$?$ae(B)e$B!"e(B
e$BJQ99$N0U?^$r9M$($k$He(B

module Kernel
unless method_defined?(:untrust)
alias untrust taint
end
end

e$B$N$h$&$Ke(B untrust e$B$,L5$1$l$PDj5A$7$F!"e(Btaint e$B$NBe$o$j$Ke(B
untrust e$B$r;H$&$Y$-$J$N$G$7$g$&$+e(B?

e$BA0ED$G$9!#e(B

2009/08/05 2:00 e$B$Ke(B Kazuhiro NISHIYAMA[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

e$B0c$$$^$9!#e(B

untrust e$B$G8!:w$7$F0c$$$r%A%’%C%/$7$F$$$?$i8+Mn$H$7$F$7$^$C$F$$$^$7$?!#e(B

untruste$B$H$$$&MQ8l$rF~$l$?J}$,$o$+$j$d$9$$$+$b$7$l$J$$$G$9$M!#e(B
e$B$b$H$b$H$NL>A0$,0-$$$N$G!"!Ve(Buntrustede$B$G$J$$!W$N$h$&$KFs=EH]Dj$Ke(B
e$B$J$C$F$7$^$$$^$9$,e(B…e$B!#e(B

e$BJQ99$N0U?^$r9M$($k$He(B

module Kernel
unless method_defined?(:untrust)
alias untrust taint
end
end

e$B$N$h$&$Ke(B untrust e$B$,L5$1$l$PDj5A$7$F!"e(Btaint e$B$NBe$o$j$Ke(B
untrust e$B$r;H$&$Y$-$J$N$G$7$g$&$+e(B?

e$B$O$$!“0U?^[email protected]$K$9$k$?$a$K$O!”$=$NJ}$,K>$^$7$$$h$&$K;W$$$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs