[wp-trac] [WordPress Trac] #30377: wp_check_filetype is broken when checking urls with parameters
WordPress Trac
noreply at wordpress.org
Fri Jan 20 16:46:18 UTC 2017
#30377: wp_check_filetype is broken when checking urls with parameters
-------------------------------------+-----------------------------
Reporter: supercleanse | Owner: johnbillion
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Media | Version: 4.0
Severity: normal | Resolution:
Keywords: needs-testing has-patch | Focuses:
-------------------------------------+-----------------------------
Changes (by ianmjones):
* keywords: needs-testing needs-unit-tests needs-refresh => needs-testing
has-patch
Comment:
My 30377.4.diff patch allows `wp_check_filetype` to find the extension of
a file in a URL when it also includes either query params or a fragment.
This is really important for use cases such as @supercleanse's where
signed URLs are failing to instantiate the default media player due to
`wp_check_filetype` not finding the extension.
The patch also fixes `strip_fragment_from_url` throwing "Undefined index:
path" when a URL without a trailing slash is passed to it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30377#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list