[wp-trac] [WordPress Trac] #30377: wp_check_filetype is broken when checking urls with parameters
WordPress Trac
noreply at wordpress.org
Sun May 24 14:50:23 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- | Version: 4.0
refresh | Resolution:
| Focuses:
-------------------------------------------------+-------------------------
Comment (by layotte):
I just submitted a patch for this. Running into the problem when using a
file from Soundcloud which has query args. Instead of a regex, I chose to
get the 'path' from parse_url, which works in these cases:
{{{
file.mp3
c:\file.mp3
/usr/local/bin/file.mp3
http://lewayotte.com/file.mp3
lewayotte.com/file.mp3
http://lewayotte.com/file.mp3?test=1
lewayotte.com/file.mp3?test=1
http://lewayotte.com/file.mp3?test=1&echo=2
lewayotte.com/file.mp3?test=1&echo=2
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30377#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list