Thumbnail generation crashes on SVG if not uploaded by admin
- Status
- Open
- Subject
- Thumbnail generation crashes on SVG if not uploaded by admin
- Version
- 18.x
- Category
- Bug
- Easy for Newbie Dev
- Feature
- File Gallery (elFinder or standard UI)
- Resolution status
- New
- Submitted by
- hman
- Lastmod by
- hman
- Rating
- Related-to
- Description
SVG uploading can be blocked by admin, because there are certain security risks with them. But Tiki file galleries have a different problem with them. When admin uploads a SVG, a default thumbnail for the MIME type image/svg+xml is displayed (instead of the embedded thumbnail!). That's not optimal, but at least it works.
When a user uploads a SVG, something else happens: Thumbnail generation crashes. Instead of the default thumbnail a tiny error message is displayed in a window the size of the thumbnail. It reads:
Copy to clipboardWarning: imagecreatefromstring(): Data is not in a recognized format in MYHOME/htdocs/tiki-18.8/lib/images/gd.php on line 70 Warning: Cannot modify header information - headers already sent by (output started at MYHOME/tiki-18.8/lib/images/gd.php:70) in MYHOME/tiki-18.8/tiki-download_file.php on line 395 Warning: Cannot modify header information - headers already sent by (output started at MYHOME/tiki-18.8/lib/images/gd.php:70) in MYHOME/tiki-18.8/tiki-download_file.php on line 404 Warning: Cannot modify header information - headers already sent by (output started at MYHOME/tiki-18.8/lib/images/gd.php:70) in MYHOME/tiki-18.8/tiki-download_file.php on line 442
After that, something that looks like the header of the thumbnail followsCopy to clipboard�PNG ((0000)) IHDR}�((0008))((0003))
and after that LOTS of binary garbage, possibly the entire rest of the file...My Linux desktop (Linux Mint 19.3) a.k.a. Ubuntu Bionic Beaver with Cinnamon as desktop does display the embedded thumbnail. I'll have to figure out which binary compiles the thumbnails for image/svg+xml (does not have to be the same that is used for JPEG, PNG etc.).
- Importance
- 7
- Easy to solve?
- 10 easy
- Priority
- 70
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 8112
- Created
- Thursday 03 March, 2022 08:17:02 UTC
by hman - LastModif
- Thursday 03 March, 2022 08:21:26 UTC