Permission problem when Including LaTeX content from file system

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Permission problem when Including LaTeX content from file system

Felix Natter
Administrator
hello Devs,

there is a latex feature for reading (otherwise ignored) LaTeX content
from filesystem for inclusion in LaTeX export [1]

However, this is broken in 1.5.x, even if "Permit file/read operations"
in Plugins->Scripting is enabled:

javax.xml.transform.TransformerException: com.sun.org.apache.xalan.internal.xsltc.TransletException: java.lang.SecurityException: Freeplane groovy scripts are restricted. The following File operation is forbidden: Read /home/felix/src/alg_0.xml. You can change this in the program settings.
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:353)
        at org.freeplane.features.export.mindmapmode.XsltExportEngine.export(XsltExportEngine.java:69)
        at org.freeplane.features.export.mindmapmode.ExportDialog.export(ExportDialog.java:171)
        at org.freeplane.features.export.mindmapmode.ExportAction.export(ExportAction.java:54)
        at org.freeplane.features.export.mindmapmode.ExportAction.actionPerformed(ExportAction.java:50)
        at org.freeplane.core.ui.AccelerateableAction.actionPerformed(AccelerateableAction.java:90)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
        at java.awt.Component.processMouseEvent(Component.java:6516)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
        at java.awt.Component.processEvent(Component.java:6281)
        at java.awt.Container.processEvent(Container.java:2229)
        at java.awt.Component.dispatchEventImpl(Component.java:4872)
        at java.awt.Container.dispatchEventImpl(Container.java:2287)
        at java.awt.Component.dispatchEvent(Component.java:4698)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
        at java.awt.Container.dispatchEventImpl(Container.java:2273)
        at java.awt.Window.dispatchEventImpl(Window.java:2719)
        at java.awt.Component.dispatchEvent(Component.java:4698)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
        at java.awt.EventQueue.access$300(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:706)
        at java.awt.EventQueue$3.run(EventQueue.java:704)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:720)
        at java.awt.EventQueue$4.run(EventQueue.java:718)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: com.sun.org.apache.xalan.internal.xsltc.TransletException: java.lang.SecurityException: Freeplane groovy scripts are restricted. The following File operation is forbidden: Read /home/felix/src/alg_0.xml. You can change this in the program settings.
        at com.sun.org.apache.xalan.internal.xsltc.dom.LoadDocument.documentF(LoadDocument.java:149)
        at mm2latexinput.template$dot$1()
        at mm2latexinput.applyTemplates()
        at mm2latexinput.template$dot$1()
        at mm2latexinput.applyTemplates()
        at mm2latexinput.template$dot$0()
        at mm2latexinput.applyTemplates()
        at mm2latexinput.applyTemplates()
        at mm2latexinput.transform()
        at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:620)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:742)
        ... 44 more

It's simple to reproduce, see [1]. Shall I create a bug report for this?

[1]
http://www.freeplane.org/wiki/index.php/LaTeX_in_Freeplane#Including_LaTeX_content_from_file_system

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Permission problem when Including LaTeX content from file system

Dimitry Polivaev
Administrator
Hello Felix,

I looked at it once again. It is probably a bug.

Please file a bug report with all files I need to reproduce your steps and detailed description of
what should be done.

Regards,
Dimitry

> there is a latex feature for reading (otherwise ignored) LaTeX content
> from filesystem for inclusion in LaTeX export [1]
>
> However, this is broken in 1.5.x, even if "Permit file/read operations"
> in Plugins->Scripting is enabled:
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Permission problem when Including LaTeX content from file system

Felix Natter
Administrator
hello Dimitry,

I created a bug report:
https://sourceforge.net/p/freeplane/bugs/2379/

I also created a bug report for the Format=(Unparsed )LaTeX issue:
https://sourceforge.net/p/freeplane/bugs/2378/

Thanks and Best Regards,
Felix
Loading...