Skip to content

Commit

Permalink
BATIK-1347: Switch to empty whitelist for rhino
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk@1905011 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
simonsteiner1984 committed Nov 2, 2022
1 parent f9ae692 commit 64658cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Expand Up @@ -32,11 +32,6 @@ Licensed to the Apache Software Foundation (ASF) under one or more
*/
public class RhinoClassShutter implements ClassShutter {
public static final List<String> WHITELIST = new ArrayList<>();
static {
WHITELIST.addAll(Arrays.asList("java.io.PrintStream", "java.lang.System", "java.net.URL", ".*Permission",
"org.w3c.dom.*", "org.apache.batik.w3c.*", "org.apache.batik.anim.*", "org.apache.batik.dom.*",
"org.apache.batik.css.*"));
}

/*
public RhinoClassShutter() {
Expand Down
Expand Up @@ -18,6 +18,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
*/
package org.apache.batik.test.xml;

import org.apache.batik.script.rhino.RhinoClassShutter;
import org.apache.batik.test.DefaultTestSuite;
import org.apache.batik.test.Test;
import org.apache.batik.test.TestException;
Expand Down Expand Up @@ -57,6 +58,9 @@ public static void beforeClass() throws IOException {
fos.close();
tmp.deleteOnExit();
System.setProperty("java.security.policy", tmp.getAbsolutePath());
RhinoClassShutter.WHITELIST.addAll(Arrays.asList("java.io.PrintStream", "java.lang.System", "java.net.URL",
".*Permission", "org.w3c.dom.*", "org.apache.batik.w3c.*", "org.apache.batik.anim.*",
"org.apache.batik.dom.*", "org.apache.batik.css.*"));
}

@Parameterized.Parameters
Expand Down

0 comments on commit 64658cc

Please sign in to comment.