[#3747] constants (or class vriable?) — Wakou Aoyama <wakou@...>

青山です。

20 messages 1998/12/06
[#3751] Re: constants (or class vriable?) — Shin-ichro Hara <sinara@...> 1998/12/07

原です。

[#3763] Re: constants (or class vriable?) — Wakou Aoyama <wakou@...> 1998/12/07

青山です。

[#3764] Re: constants (or class vriable?) — matz@... (Yukihiro Matsumoto) 1998/12/08

まつもと ゆきひろです

[#3767] Re: constants (or class vriable?) — kjana@... (YANAGAWA Kazuhisa) 1998/12/08

In message <199812080034.JAA05946@picachu.netlab.co.jp>

[#3826] ruby 1.1d0 released — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

35 messages 1998/12/16

[#3873] (?: ) does not work? — shugo@... (MAEDA Shugo)

前田です。

15 messages 1998/12/19

[#3881] I want to catch all jump — shugo@... (Shugo Maeda)

前田です。

17 messages 1998/12/21
[#3895] Re: I want to catch all jump — matz@... (Yukihiro Matsumoto) 1998/12/22

まつもと ゆきひろです

[#3894] ruby 1.1d1 released — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

25 messages 1998/12/22

[#3899] interpreter reinitialization — shugo@... (Shugo Maeda)

前田です。

22 messages 1998/12/22
[#3923] Re: interpreter reinitialization — matz@... (Yukihiro Matsumoto) 1998/12/23

まつもと ゆきひろです

[#3926] Re: interpreter reinitialization — shugo@... (Shugo Maeda) 1998/12/23

前田です。

[#3931] Re: interpreter reinitialization — matz@... (Yukihiro Matsumoto) 1998/12/24

まつもと ゆきひろです

[#3956] Re: interpreter reinitialization — shugo@... (Shugo Maeda) 1998/12/24

前田です。

[#3960] Re: interpreter reinitialization — matz@... (Yukihiro Matsumoto) 1998/12/24

まつもと ゆきひろです

[#4002] config.guess — Koji Arai <JCA02266@...>

新井です。

24 messages 1998/12/26
[#4039] Re: config.guess — matz@... (Yukihiro Matsumoto) 1998/12/29

まつもと ゆきひろです

[#4045] Re: config.guess — Koji Arai <JCA02266@...> 1998/12/31

新井です。

[#4047] Re: config.guess — matz@... (Yukihiro Matsumoto) 1999/01/01

まつもと ゆきひろです

[#4048] Re: config.guess — Koji Arai <JCA02266@...> 1999/01/01

新井です。

[#4049] Re: config.guess — matz@... (Yukihiro Matsumoto) 1999/01/02

まつもと ゆきひろです

[#4050] Re: config.guess — Motoyuki Kasahara <m-kasahr@...> 1999/01/04

笠原です。

[#4030] module Precision — gotoken@... (GOTO Kentaro)

ごとけんです

78 messages 1998/12/28
[#4310] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/01/21

ごとけんです

[#4311] Re: module Precision — matz@... (Yukihiro Matsumoto) 1999/01/21

まつもと ゆきひろです

[#4312] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/01/21

ごとけんです

[#4317] Re: module Precision — keiju@... (石塚圭樹 ) 1999/01/21

けいじゅ@日本ラショナルソフトウェアです.

[#4364] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/01/25

ごとけんです

[#4478] Re: module Precision — matz@... (Yukihiro Matsumoto) 1999/01/28

まつもと ゆきひろです

[#4506] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/01/30

ごとけんです

[#4552] Re: module Precision — matz@... (Yukihiro Matsumoto) 1999/02/01

まつもと ゆきひろです

[#4557] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/02/01

ごとけんです

[#4632] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/02/03

ごとけんです

[#4647] Re: module Precision — keiju@... (石塚圭樹 ) 1999/02/03

けいじゅ@日本ラショナルソフトウェアです.

[#4648] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/02/03

ごとけんです

[#4633] Re: module Precision — matz@... (Yukihiro Matsumoto) 1999/02/03

まつもと ゆきひろです

[#4636] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/02/03

ごとけんです

[#4836] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/02/08

ごとけんです

[#4843] Re: module Precision — keiju@... (石塚圭樹 ) 1999/02/08

けいじゅ@日本ラショナルソフトウェアです.

[#4849] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/02/08

ごとけんです

[#4924] Re: module Precision — keiju@... (石塚圭樹 ) 1999/02/09

けいじゅ@日本ラショナルソフトウェアです.

[#4976] a genericity — gotoken@... (GOTO Kentaro) 1999/02/10

ごとけんです

[#5008] Re: a genericity — keiju@... (石塚圭樹 ) 1999/02/11

けいじゅ@日本ラショナルソフトウェアです.

[#5018] Re: a genericity — gotoken@... (GOTO Kentaro) 1999/02/11

ごとけんです

[#5171] Re: a genericity — keiju@... (石塚圭樹 ) 1999/02/16

けいじゅ@日本ラショナルソフトウェアです.

[ruby-dev:3966] [BUG] exception in safe level 4

From: shugo@... (Shugo Maeda)
Date: 1998-12-24 20:49:20 UTC
List: ruby-dev #3966
前田です。

safe levelが4の時に例外が発生すると無限ループに陥いります。
これはrb_exc_newでrb_iv_setを呼ぶ時に例外が発生し、再びrb_exc_newが
呼ばれるためです。

safe levelが4の時に!tainted?なオブジェクトに対して変更が許されなくな
っているせいなのですが、これは制限がきつすぎないでしょうか。
変更された時にtaintするくらいでよいように思います。


-- 
前田 修吾 (mailto:shugo@aianet.ne.jp)

Attachments (1)

ruby.diff (1.58 KB, text/x-diff)
--- array.c.orig	Wed Nov 25 12:31:09 1998
+++ array.c	Fri Dec 25 00:46:05 1998
@@ -48,7 +48,7 @@
     if (FL_TEST(ary, ARY_FREEZE|ARY_TMPLOCK))
 	rb_raise(rb_eTypeError, "can't modify frozen array");
     if (rb_safe_level() >= 4 && !FL_TEST(ary, FL_TAINT))
-	rb_raise(rb_eSecurityError, "Insecure: can't modify array");
+	rb_obj_taint(ary);
 }
 
 VALUE
--- hash.c.orig	Tue Dec 22 18:01:51 1998
+++ hash.c	Fri Dec 25 00:46:05 1998
@@ -31,7 +31,7 @@
     if (FL_TEST(hash, HASH_FREEZE))
 	rb_raise(rb_eTypeError, "can't modify frozen hash");
     if (rb_safe_level() >= 4 && !FL_TEST(hash, FL_TAINT))
-	rb_raise(rb_eSecurityError, "Insecure: can't modify hash");
+	rb_obj_taint(hash);
 }
 
 VALUE
--- string.c.orig	Thu Dec 24 13:39:55 1998
+++ string.c	Fri Dec 25 00:46:05 1998
@@ -354,7 +354,7 @@
     if (FL_TEST(str, STR_FREEZE))
 	rb_raise(rb_eTypeError, "can't modify frozen string");
     if (rb_safe_level() >= 4 && !FL_TEST(str, FL_TAINT))
-	rb_raise(rb_eSecurityError, "Insecure: can't modify string");
+	rb_obj_taint(str);
     if (!RSTRING(str)->orig || FL_TEST(str, STR_NO_ORIG)) return;
     ptr = RSTRING(str)->ptr;
     RSTRING(str)->ptr = ALLOC_N(char, RSTRING(str)->len+1);
--- variable.c.orig	Thu Dec 24 14:08:47 1998
+++ variable.c	Fri Dec 25 00:46:05 1998
@@ -851,7 +851,7 @@
       case T_MODULE:
       case T_FILE:
 	if (rb_safe_level() >= 4 && !FL_TEST(obj, FL_TAINT))
-	    rb_raise(rb_eSecurityError, "Insecure: can't modify instance variable");
+	    rb_obj_taint(obj);
 	if (!ROBJECT(obj)->iv_tbl) ROBJECT(obj)->iv_tbl = st_init_numtable();
 	st_insert(ROBJECT(obj)->iv_tbl, id, val);
 	break;

In This Thread

Prev Next