[wp-trac] [WordPress Trac] #34562: `wp_tempnam()` can return a path that already exists

WordPress Trac noreply at wordpress.org
Sun Dec 6 16:08:48 UTC 2015


#34562: `wp_tempnam()` can return a path that already exists
----------------------------+-----------------------
 Reporter:  dd32            |       Owner:  dd32
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  4.4
Component:  Filesystem API  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+-----------------------
Changes (by dd32):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 This unfortunately didn't get applied to the WP_Upgrader class too, which
 doesn't rely upon `wp_tempnam()` as it's after a directory name, not a
 filename.

 We should apply something similar to Upgrades to reduce the chances of
 issues caused by any upgrade-related race conditions.
 [attachment:34562.2.diff] should do this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34562#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list