mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* thread.c (recursive_push): untrust internal hash to prevent
unexpected SecurityError. a patch from Kazuhiro NISHIYAMA. Fix: #1864 [ruby-dev:38982] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0fe4c1decb
commit
0f1c1ecbd8
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Aug 3 18:12:54 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* thread.c (recursive_push): untrust internal hash to prevent
|
||||
unexpected SecurityError. a patch from Kazuhiro NISHIYAMA.
|
||||
Fix: #1864 [ruby-dev:38982]
|
||||
|
||||
Mon Aug 3 17:06:05 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/README: updated. a patch from Daniel Bovensiepen.
|
||||
|
|
2
thread.c
2
thread.c
|
@ -3362,6 +3362,7 @@ recursive_push(VALUE hash, VALUE obj, VALUE paired_obj)
|
|||
}
|
||||
if (NIL_P(list) || TYPE(list) != T_HASH) {
|
||||
list = rb_hash_new();
|
||||
OBJ_UNTRUST(list);
|
||||
rb_hash_aset(hash, sym, list);
|
||||
}
|
||||
if (!paired_obj) {
|
||||
|
@ -3374,6 +3375,7 @@ recursive_push(VALUE hash, VALUE obj, VALUE paired_obj)
|
|||
if (TYPE(pair_list) != T_HASH){
|
||||
VALUE other_paired_obj = pair_list;
|
||||
pair_list = rb_hash_new();
|
||||
OBJ_UNTRUST(pair_list);
|
||||
rb_hash_aset(pair_list, other_paired_obj, Qtrue);
|
||||
rb_hash_aset(list, obj, pair_list);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue