[wp-trac] [WordPress Trac] #30377: wp_check_filetype is broken when checking urls with parameters

WordPress Trac noreply at wordpress.org
Thu Jun 11 12:30:29 UTC 2015


#30377: wp_check_filetype is broken when checking urls with parameters
-------------------------------------------------+-------------------------
 Reporter:  supercleanse                         |       Owner:
     Type:  defect (bug)                         |  wonderboymusic
 Priority:  normal                               |      Status:  reopened
Component:  Media                                |   Milestone:  Future
 Severity:  normal                               |  Release
 Keywords:  has-patch needs-testing needs-unit-  |     Version:  4.0
  tests                                          |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------

Comment (by layotte):

 Replying to [comment:19 dd32]:
 > > If we're going to explicitly allow support for URLs (which we need to
 do by extension of the fact that this function is used in the
 wp_[audio|video|playlist]_shortcode() functions), this is gonna need unit
 test coverage and security review.
 >
 > I'd personally prefer to add an explicit `wp_check_url_filetype()`
 function instead, one which extracts the actual filename from the URL and
 passes it along to `wp_check_filetype()` (if appropriate, or duplicates
 parts of it)

 I've submitted a patch for this.

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


More information about the wp-trac mailing list