From fb7c6c152b4bd299a70b725faf31eaec6c5f3616 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 22 May 2001 08:27:03 +0000 Subject: [PATCH] * variable.c (rb_alias_variable): should not allow variable aliasing if $SAFE >= 4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 9 +++++++-- variable.c | 2 ++ version.h | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fc0b0f780..2c9172913f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +Tue May 22 17:10:35 2001 K.Kosako + + * variable.c (rb_alias_variable): should not allow variable + aliasing if $SAFE >= 4. + Mon May 21 15:26:05 JST 2001 Keiju Ishitsuka - * lib/irb/multi-irb.rb - delete japanese messages. + + * lib/irb/multi-irb.rb: delete japanese messages. Mon May 21 13:15:25 2001 Yukihiro Matsumoto diff --git a/variable.c b/variable.c index 6e2ef0c875..47ea7ee0e7 100644 --- a/variable.c +++ b/variable.c @@ -703,6 +703,8 @@ rb_alias_variable(name1, name2) { struct global_entry *entry1, *entry2; + if (rb_safe_level() >= 4) + rb_raise(rb_eSecurityError, "Insecure: can't alias global variable"); entry1 = rb_global_entry(name1); entry2 = rb_global_entry(name2); diff --git a/version.h b/version.h index 1b1782ab6c..d69331729f 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.6.4" -#define RUBY_RELEASE_DATE "2001-05-21" +#define RUBY_RELEASE_DATE "2001-05-22" #define RUBY_VERSION_CODE 164 -#define RUBY_RELEASE_CODE 20010521 +#define RUBY_RELEASE_CODE 20010522