[wp-trac] [WordPress Trac] #57516: WP_Filesystem_*::dirlist() may create invalid path
WordPress Trac
noreply at wordpress.org
Fri Jan 20 18:35:42 UTC 2023
#57516: WP_Filesystem_*::dirlist() may create invalid path
----------------------------+------------------------------
Reporter: afragen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem API | Version: 2.5
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
----------------------------+------------------------------
Comment (by costdev):
I've submitted [https://github.com/WordPress/wordpress-develop/pull/3877
PR 3877].
There's an additional benefit for the filesystem classes that by using
`$path = trailingslashit( $path )` before it's concatenated, the code is
easier to read, and unnecessary concatenation isn't done in every
iteration of the FTP loops.
All uses of `$path` after the PR's `$path = trailingslashit( $path )` were
previously concatenated, so this doesn't cause any issues later.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57516#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list