J3 Issue ?
Referenced as Duplicate of: # 16877
avatar joris85
joris85
21 Jun 2017

Steps to reproduce the issue

Upload SVG image, even if the media manager is accepting it it is blocked.

Expected result

Uploading is working if the media manager that is used accept them (Ark Media in my case).

Actual result

On upload it is blocked by Joomla
Here you can find my post on ArkExtensions where the developer is explaining to me what the problem is.
http://arkextensions.com/technical-support/4954-svg-image-file-type-not-right-on-upload#reply-4958

Additional comments

I understand SVG is a security issue, there it is not my expertise i am happy people make it secure.
But SVG is a really nice way to show logo's and certain images that needs to be great in different sizes.
Is there a way to keep it secure but giving ACL to the upload function so i as super user can upload images?

Thanks!

avatar joris85 joris85 - open - 21 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Jun 2017
avatar joris85 joris85 - change - 21 Jun 2017
The description was changed
avatar joris85 joris85 - edited - 21 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Jun 2017
Status New Duplicate Report
Closed_Date 0000-00-00 00:00:00 2017-06-21 08:05:48
Closed_By franz-wohlkoenig
Rel_Number 0 14356
Relation Type Duplicate of
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jun 2017
Status Duplicate Report Closed
Closed_By franz-wohlkoenig joomla-cms-bot
Rel_Number 14356 0
Relation Type Duplicate of
avatar joomla-cms-bot joomla-cms-bot - close - 21 Jun 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Jun 2017

closed as duplicated Report of #14356


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16795.

avatar joomla-cms-bot
joomla-cms-bot - comment - 21 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Jun 2017
Category com_media
avatar brianteeman
brianteeman - comment - 21 Jun 2017

Re-opening. #14356 is specific to com_fields and this is more generic

avatar brianteeman brianteeman - change - 21 Jun 2017
Status Closed New
Closed_Date 2017-06-21 08:05:48
Closed_By joomla-cms-bot
avatar brianteeman brianteeman - reopen - 21 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Jun 2017
Status New Discussion
avatar tonypartridge
tonypartridge - comment - 10 Jul 2017

Looking into this it's caused by line 294 on
libraries/cms/helper/media.php

'xml', 'xmp', '!DOCTYPE', '!--',

to be exact. Each of these is a match within an SVG.

My only thought is to add an exception here if it is an <SVG and run a basic sanitizer through it?

avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Jul 2017
Status Discussion Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Aug 2017

@tonypartridge any Progress on this?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16795.

avatar N6REJ
N6REJ - comment - 27 Aug 2017

I tried to go to his site... way uncool
image

avatar N6REJ
N6REJ - comment - 27 Aug 2017

This might be a viable solution.. https://github.com/darylldoyle/svg-sanitizer

avatar N6REJ
N6REJ - comment - 27 Aug 2017

@tonypartridge idk where you got that path from.. It doesn't exist in current J! staging.

avatar tonypartridge
tonypartridge - comment - 31 Aug 2017

@N6REJ The path has changed for 3.8 I believe. it is now:
/libraries/src/Helper/MediaHelper.php

avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Sep 2017
Status Information Required Discussion
avatar genr8r
genr8r - comment - 30 Oct 2017

As an intermediate step could svg upload/edit support be added in Templates:Customize?

That would have the ACL restrictions for uploading already taken care of. It also allows for the more likely use case of svg's as a template elements rather than end user uploads via media manager.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16795.

avatar dgt41
dgt41 - comment - 30 Oct 2017

try this: #13499

avatar N6REJ
N6REJ - comment - 1 Nov 2017

As @dgt41 stated, webp is not implemented either so this would be a perfect time to make this happen.

avatar brianteeman
brianteeman - comment - 1 Nov 2017

why add support for an image format that is not supported on the set of browsers joomla supports

avatar mbabker
mbabker - comment - 1 Nov 2017

Users can deploy Joomla sites with higher requirements than what we offer support for out-of-the-box.

avatar dgt41
dgt41 - comment - 1 Nov 2017

so this would be a perfect time to make this happen

Are we talking for Joomla 3 or 4 here?

avatar genr8r
genr8r - comment - 1 Nov 2017

@dgt41 thanks for the suggestion. My use case is for uploading and editing svg's within the template manager. I am able to upload but not to edit within the code editor at Templates:Customize. I am not even making a big push for svg inclusion in media manager. I am advocating for the ability to make adjustments to existing svg's as template elements. As I suggested above, inclusion in just templates provides better ACL control than broader implementation and provides for the most likely scenario of using them as template design elements rather than content items.

avatar dgt41
dgt41 - comment - 1 Nov 2017

@genr8r so you need something like: #14485 and then allowing svg files to be manipulated in the com_template options...

avatar genr8r
genr8r - comment - 1 Nov 2017

@dgt41 exactly. Just thought other developers might also appreciate this flexibility rather than having to break out an IDE to tweak a color or other parameter on an svg element used in a template. I am sensitive to @brianteeman comments about unsupported image formats and I am aware of the security concerns that svg's introduce. It is just that I am seeing more svg implementation in templates and frameworks (specifically Gantry).

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar jwaisner jwaisner - change - 11 Mar 2020
Status Discussion New
Build 3.7.2 4.0-dev
avatar jwaisner jwaisner - change - 11 Mar 2020
Category com_media com_media Feature Request
avatar Quy Quy - change - 7 Apr 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-04-07 17:55:33
Closed_By Quy
avatar Quy
Quy - comment - 7 Apr 2020

Please test PR #28599.

avatar Quy Quy - close - 7 Apr 2020

Add a Comment

Login with GitHub to post a comment