mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_call0): wrong condition to check insecure method.
a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
93fb1e1d51
commit
4bbdc4c4d5
2 changed files with 4 additions and 2 deletions
|
|
@ -3,6 +3,9 @@ Thu Jun 26 17:43:41 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
* variable.c (rb_f_trace_var): should not be allowed at safe level 4.
|
||||
a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>.
|
||||
|
||||
* eval.c (rb_call0): wrong condition to check insecure method.
|
||||
a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>.
|
||||
|
||||
Wed Jun 25 18:54:54 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* lib/{cgi-lib,getopts,importenv}.rb: check caller[0] because when
|
||||
|
|
|
|||
3
eval.c
3
eval.c
|
|
@ -5828,8 +5828,7 @@ rb_call0(klass, recv, id, oid, argc, argv, body, flags)
|
|||
TMP_PROTECT;
|
||||
volatile int safe = -1;
|
||||
|
||||
if (NOEX_SAFE(flags) > ruby_safe_level &&
|
||||
ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) {
|
||||
if (NOEX_SAFE(flags) > ruby_safe_level && NOEX_SAFE(flags) > 2) {
|
||||
rb_raise(rb_eSecurityError, "calling insecure method: %s",
|
||||
rb_id2name(id));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue