[wp-trac] [WordPress Trac] #48506: wp_mkdir_p does not support relative paths
WordPress Trac
noreply at wordpress.org
Wed Nov 6 21:00:45 UTC 2019
#48506: wp_mkdir_p does not support relative paths
--------------------------+------------------------------
Reporter: greengremlin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.2.4
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by mpcube):
I dont' know, what exactly the reason for this change was, but for me the
following solution would fit:
In _wp_upload_dir(): use path_join() to join ABSPATH and UPLOADS (not just
ABSPATH and $upload_path)
In path_join(): replace /foo/bar/../baz with /foo/baz so that UPLOADS and
$upload_path can be a string starting with ../
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48506#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list