Skip to content

Commit

Permalink
script: give access to org.mozilla.javascript.EcmaError in the Rhin…
Browse files Browse the repository at this point in the history
…o shutter [BATIK-912]
  • Loading branch information
carlosame committed Jul 3, 2024
1 parent 648ea80 commit 1ac7a4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static void loadWhitelist(Reader reader) throws IOException, PatternSynta
public boolean visibleToScripts(String fullClassName) {
// Don't let them mess with script engine's internals.
if (fullClassName.startsWith("org.mozilla.javascript"))
return false;
return "org.mozilla.javascript.EcmaError".equals(fullClassName);

if (fullClassName.startsWith("io.sf.carte.echosvg.")) {
// Just get package within this implementation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public void testShutter() {
assertFalse(shutter.visibleToScripts("io.sf.carte.echosvg.script.rhino.RhinoClassShutter"));
assertTrue(shutter.visibleToScripts("io.sf.carte.echosvg.dom.SVGOMDocument"));
assertTrue(shutter.visibleToScripts("org.w3c.dom.Document"));
assertTrue(shutter.visibleToScripts("org.mozilla.javascript.EcmaError"));
assertTrue(shutter.visibleToScripts(
"io.sf.carte.echosvg.bridge.ScriptingEnvironment$Window$IntervalScriptTimerTask"));
assertTrue(shutter.visibleToScripts(
Expand Down

0 comments on commit 1ac7a4b

Please sign in to comment.