PHP 8.2.31
Preview: remove_entry_secure-i.yaml Size: 1.88 KB
//proc/self/root/proc/self/root/proc/self/root/opt/alt/ruby18/share/ri/1.8/system/FileUtils/remove_entry_secure-i.yaml

--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This method removes a file system entry <tt>path</tt>. <tt>path</tt> shall be a regular file, a directory, or something. If <tt>path</tt> is a directory, remove it recursively. This method is required to avoid TOCTTOU (time-of-check-to-time-of-use) local security vulnerability of #rm_r. #rm_r causes security hole when:"
- !ruby/struct:SM::Flow::VERB 
  body: "  * Parent directory is world writable (including /tmp).\n  * Removing directory tree includes world writable directory.\n  * The system has symbolic link.\n"
- !ruby/struct:SM::Flow::P 
  body: To avoid this security hole, this method applies special preprocess. If <tt>path</tt> is a directory, this method chown(2) and chmod(2) all removing directories. This requires the current process is the owner of the removing whole directory tree, or is the super user (root).
- !ruby/struct:SM::Flow::P 
  body: "WARNING: You must ensure that <b>ALL</b> parent directories cannot be moved by other untrusted users. For example, parent directories should not be owned by untrusted users, and should not be world writable except when the sticky bit set."
- !ruby/struct:SM::Flow::P 
  body: "WARNING: Only the owner of the removing directory tree, or Unix super user (root) should invoke this method. Otherwise this method does not work."
- !ruby/struct:SM::Flow::P 
  body: "For details of this security vulnerability, see Perl's case:"
- !ruby/struct:SM::Flow::VERB 
  body: "  http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448\n  http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452\n"
- !ruby/struct:SM::Flow::P 
  body: For fileutils.rb, this vulnerability is reported in [ruby-dev:26100].
full_name: FileUtils#remove_entry_secure
is_singleton: false
name: remove_entry_secure
params: (path, force = false)
visibility: public

Directory Contents

Dirs: 5 × Files: 52

Name Size Perms Modified Actions
DryRun DIR
- drwxr-xr-x 2024-03-03 22:50:12
Edit Download
Entry_ DIR
- drwxr-xr-x 2024-03-03 22:50:12
Edit Download
NoWrite DIR
- drwxr-xr-x 2024-03-03 22:50:12
Edit Download
- drwxr-xr-x 2024-03-03 22:50:12
Edit Download
Verbose DIR
- drwxr-xr-x 2024-03-03 22:50:12
Edit Download
640 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
6.06 KB lrw-r--r-- 2023-07-26 13:47:38
Edit Download
236 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
598 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
504 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
756 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
765 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
229 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
458 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
421 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
553 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
307 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
240 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
1.04 KB lrw-r--r-- 2023-07-26 13:47:38
Edit Download
373 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
356 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
884 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
1.29 KB lrw-r--r-- 2023-07-26 13:47:38
Edit Download
188 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
195 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
220 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
506 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
243 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
747 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
240 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
1.23 KB lrw-r--r-- 2023-07-26 13:47:38
Edit Download
1.32 KB lrw-r--r-- 2023-07-26 13:47:38
Edit Download
364 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
248 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
539 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
836 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
244 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
240 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
787 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
414 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
415 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
337 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
239 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
356 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
482 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
1.88 KB lrw-r--r-- 2023-07-26 13:47:38
Edit Download
325 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
659 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
557 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
242 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
414 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
1.18 KB lrw-r--r-- 2023-07-26 13:47:38
Edit Download
546 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
251 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
248 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
531 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download
538 B lrw-r--r-- 2023-07-26 13:47:38
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).