Item14361: Update config {ImageFormat} and library support for svg#2
Item14361: Update config {ImageFormat} and library support for svg#2BramVan-Oosterhout wants to merge 1 commit intofoswiki:masterfrom
Conversation
- Config {GraphvizPlugin}{ImageFormat} = <object data=...></object> to support inline="on"
- library=Web.Topic parameter now honoured by type="svg"
|
This patch changes more than actuall attributed in the pull request's title. Can we make this a minimal one to address the issue at hand? |
|
Apologies, The comment should refer to inline "off" rather than inline "on" The inline "on" was supported by the {SvgFormat} provided in the current release. I am not sure what you mean with "Can we make this a minimal one to address the issue at hand?" The changes in Core.pm are supporting the library as follows (I use the new line numbers). The current release supports svg images only if they are in the same directory as the svg code. inline "on" processing remains unchanged in line 195-203 inline "off" needs to write the updated svg back to file. line 205 Non svg images also require the {ImageFormat} to be updated. line 209 The update of {ImageFormat} is the same, so I placed that in _updateFormat for readbility. line 220-233 rather than repeat the code? Do you prefer to repeat the original code for the update of {ImageFormat}? Instead of: And should I change the title to: Or did you mean something else? Perhaps the issue raised in Item15299? But that Item does not deal with the svg embedded images. |
|
Yes, well, the _updateFormat doesn't really seem to be related nor required, imho. The title is just fine. The only concern I have is security by setting the library path to some mallicious server side directory that you could pull in data from using dot. Does you patch protect against setting imagepath or library to /etc? |
|
Happy to replace _updateFormat. No, the patch does not reject a
Hmmm. Thinking about this more, the above does not protect against a malicious script attached to a topic. Should one check each file with I believe the Changing the The former one can deny by scanning The latter seems over the top. As an alternative to all this, one could add a config setting What do you think? |
Please review