Delete directory using symlink when decompressing tar
该报告还没有中文解读。
原文摘录
摘自原文(2704 字符中的一小部分)
In 2.7.6, the safety of symlink is confirmed with `mkdir_p_safe`, Before that `FileUtils.rm_rf destination` is running. Therefore, if `tmp/dir` is specified after `tmp -> /tmp`, the following `/tmp/dir` is deleted.
原文中的代码
require 'rubygems/package'
class GemBuiler
def initialize spec, path
@_build_time = Time.now
@_checksums = {}
@_signer = Gem::Security::Signer.new nil, nil, ""
@_spec = spec
@_path = path
end
def build &block
Gem.load_yaml …默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 RubyGems 所有。
时间线
- 报告提交
- 公开披露
阅读 HackerOne 原文 ↗作者 @ooooooo_q · 版权归作者与 RubyGems 所有