FilterHtmlImageSecure filters out valid local svg images

Created on 24 February 2017, over 7 years ago
Updated 12 March 2024, 8 months ago

This filter - according to its own description - is supposed to restrict the src attribute of img tags to local images . (period)

However at the end of _filter_html_image_secure_process() the php function getimagesize() decides whether the path being checked is......an image file that getimagesize() happens to support getting the size of, which excludes svg images.

  if (@getimagesize($local_image_path))

Either:

  • the filter's description should be updated to reflect that it only accepts supported image formats
  • or the filter should simply check for the existence of a file: file_exists()
πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
FilterΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡­πŸ‡ΊHungary karol haltenberger

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024