Github user FSchumacher commented on a diff in the pull request: https://github.com/apache/jmeter/pull/301#discussion_r131525468 --- Diff: src/core/org/apache/jmeter/util/JMeterUtils.java --- @@ -1261,10 +1265,39 @@ public static final void refreshUI() { */ public static void setupXStreamSecurityPolicy(XStream xstream) { // This will lift the insecure warning + // disallow any class xstream.addPermission(NoTypePermission.NONE); - // We reapply very permissive policy - // See https://groups.google.com/forum/#!topic/xstream-user/wiKfdJPL8aY - // TODO : How much are we concerned by CVE-2013-7285 - xstream.addPermission(AnyTypePermission.ANY); + // allow some classes that are hopefully secure + for (TypePermission perm : Arrays.asList(NullPermission.NULL, + ArrayTypePermission.ARRAYS, + PrimitiveTypePermission.PRIMITIVES)) { + xstream.addPermission(perm); + } + for (Class<?> allowHierarchy : Arrays.asList(java.util.Collection.class, + org.apache.jmeter.testelement.TestElement.class, + org.apache.jorphan.collections.HashTree.class, + org.apache.jmeter.samplers.SampleSaveConfiguration.class)) { + xstream.allowTypeHierarchy(allowHierarchy); --- End diff -- Done.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---