[wp-trac] [WordPress Trac] #42265: get_filesystem_method() isn't unique enough

WordPress Trac noreply at wordpress.org
Thu Oct 19 20:16:44 UTC 2017


#42265: get_filesystem_method() isn't unique enough
----------------------------+------------------------------------------
 Reporter:  bikecrazyy      |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Filesystem API  |     Version:  2.5
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  administration, performance
----------------------------+------------------------------------------

Comment (by bikecrazyy):

 Replying to [comment:5 jrchamp]:
 > To avoid that complexity, I agree that `uniqid()` is easier to use and
 often sufficient
 >
 > If `uniqid()`'s default behavior is not sufficient, you could enable the
 `more_entropy` optional parameter

 I load tested `uniqid()` without the more_entropy enabled and it seem to
 work fine. I didn't receive any file access issues so I think just using
 `uniqid()` should work.

 Do you know how SVN works? If so could you make a patch? if not I can
 learn how to submit a patch for this.

 '''Proposed fix''':
 {{{#!php
 <?php
       $temp_file_name = $context . 'temp-write-test-' . uniqid();
 }}}

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


More information about the wp-trac mailing list