зеркало из https://github.com/github/ruby.git
Use untaint for File.symlink in kernel_require.rb
Partly reverted 7d463e360b
This commit is contained in:
Родитель
b8d242d221
Коммит
d9978ce5d3
|
@ -41,7 +41,10 @@ module Kernel
|
|||
resolved_path = begin
|
||||
rp = nil
|
||||
$LOAD_PATH[0...Gem.load_path_insert_index || -1].each do |lp|
|
||||
safe_lp = lp.dup.tap(&Gem::UNTAINT)
|
||||
# TODO:
|
||||
# for test_require.rb of ruby core test suite
|
||||
# We should use Gem::UNTAINT after https://bugs.ruby-lang.org/issues/16131
|
||||
safe_lp = lp.dup.untaint
|
||||
begin
|
||||
if File.symlink? safe_lp # for backword compatibility
|
||||
next
|
||||
|
|
Загрузка…
Ссылка в новой задаче