diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-25 07:54:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-25 07:54:35 +0000 |
commit | fecda0d9f72f52f9777fb32f63eb2471353221ec (patch) | |
tree | 9476be67ef8664fb55f7d5b232992b2ff537a661 /encoding.c | |
parent | 256f355af5cc3efb543608193da615d5a9fcd340 (diff) | |
download | ruby-fecda0d9f72f52f9777fb32f63eb2471353221ec.tar.gz |
* encoding.c (require_enc): reject only loading from untrusted
load paths. [ruby-dev:44541] [Bug #5279]
* transcode.c (load_transcoder_entry): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c index 57af9762e9..3e4892b2e2 100644 --- a/encoding.c +++ b/encoding.c @@ -543,7 +543,8 @@ rb_enc_registered(const char *name) static VALUE require_enc(VALUE enclib) { - return rb_require_safe(enclib, rb_safe_level()); + int safe = rb_safe_level(); + return rb_require_safe(enclib, safe > 3 ? 3 : safe); } static int |