wp_get_attachment_url() is not url encoding
|Reported by:||danorton||Owned by:|
A fairly fundamental flaw, the function wp_get_attachment_url() doesn't return a valid URL if the filename contains unescaped URL characters.
I'm not sure, but this might be a security issue, as the current version can generate URLs that don't match the filename, but instead passes query parameters back to the server.
The attached patch for Version 3.0 file fixes this in wp-includes/post.php
Change History (7)
- Component changed from General to Security
- Milestone changed from Awaiting Review to 3.1
- Cc otterish@… added
- Keywords has-patch needs-testing added; url query removed