[wp-trac] [WordPress Trac] #39552: SVG upload support broken in 4.7.1
WordPress Trac
noreply at wordpress.org
Thu Jan 19 18:11:22 UTC 2017
#39552: SVG upload support broken in 4.7.1
----------------------------------------+----------------------
Reporter: freakpants | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.7.2
Component: Upload | Version: trunk
Severity: normal | Resolution: invalid
Keywords: needs-unit-tests has-patch | Focuses:
----------------------------------------+----------------------
Comment (by room34):
Replying to [comment:17 LewisCowles]:
> Much as it was a little PITA to change code (it always is), SVG upload
is separate from core. AFAIK the objection that stands is that it's a
security risk, so I'm not sure adding things into core to keep a small
number of plugins functional rather than update those plugins should be
such a concern.
I would suggest that even if core is not going to be modified to make this
function properly handle SVGs, it should at least be modified to not run
the function if the MIME type is image/svg+xml. What it's returning "gets
the job done" in terms of blocking SVG uploads, but it's not technically
correct. Since wp_get_image_mime() relies on PHP functions that don't know
how to handle SVGs, it shouldn't even run on SVG files.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39552#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list