[wp-trac] [WordPress Trac] #33053: download_url() includes query string in temporary filenames

WordPress Trac noreply at wordpress.org
Tue Jul 21 09:12:01 UTC 2015


#33053: download_url() includes query string in temporary filenames
-----------------------------+------------------------------
 Reporter:  Hyperopic        |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  4.2.1
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+------------------------------
Changes (by dd32):

 * keywords:  reporter-feedback has-patch dev-feedback => has-patch


Comment:

 Turns out this indeed a duplicate of #31811, however, the fix applied
 wasn't good for this example input.

 If the query includes a `.` character, then the existing regular
 expression breaks.

 I can't quite remember why this needed to be fixed in a lower-layer than
 `download_url()`, but IIRC there was another few uses of it that needed
 the fix.

 [attachment:33053.diff] combines your patch with a better splitting of the
 path. With my change alone, it works as expected, but I see no harm in
 stripping off the query parameters in `download_url()` as well.

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


More information about the wp-trac mailing list