|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/pom.xml resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/pom.xml
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/pom.xml 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/pom.xml 2014-07-25 15:38:04.783298392 -0400
|
|
|
a1792d |
@@ -0,0 +1,189 @@
|
|
|
a1792d |
+
|
|
|
a1792d |
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
a1792d |
+ <modelVersion>4.0.0</modelVersion>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <parent>
|
|
|
a1792d |
+ <groupId>org.jboss.resteasy</groupId>
|
|
|
a1792d |
+ <artifactId>resteasy-jaxrs-all</artifactId>
|
|
|
a1792d |
+ <version>3.0.8.Final</version>
|
|
|
a1792d |
+ <relativePath>../../pom.xml</relativePath>
|
|
|
a1792d |
+ </parent>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <artifactId>RESTEASY-1073-WF8</artifactId>
|
|
|
a1792d |
+ <packaging>jar</packaging>
|
|
|
a1792d |
+ <name>RESTEASY-1073-WF8</name>
|
|
|
a1792d |
+ <url>http://maven.apache.org</url>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <properties>
|
|
|
a1792d |
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
a1792d |
+ <as-version>8.0.0.Final</as-version>
|
|
|
a1792d |
+ </properties>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <build>
|
|
|
a1792d |
+ <plugins>
|
|
|
a1792d |
+ <plugin>
|
|
|
a1792d |
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
a1792d |
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
a1792d |
+ <version>2.3.2</version>
|
|
|
a1792d |
+ <configuration>
|
|
|
a1792d |
+ <source>1.6</source>
|
|
|
a1792d |
+ <target>1.6</target>
|
|
|
a1792d |
+ </configuration>
|
|
|
a1792d |
+ </plugin>
|
|
|
a1792d |
+ <plugin>
|
|
|
a1792d |
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
|
a1792d |
+ <version>2.12</version>
|
|
|
a1792d |
+ </plugin>
|
|
|
a1792d |
+ <plugin>
|
|
|
a1792d |
+ <artifactId>maven-dependency-plugin</artifactId>
|
|
|
a1792d |
+ <executions>
|
|
|
a1792d |
+ <execution>
|
|
|
a1792d |
+ <id>unpack</id>
|
|
|
a1792d |
+ <phase>process-test-classes</phase>
|
|
|
a1792d |
+ <goals>
|
|
|
a1792d |
+ <goal>unpack</goal>
|
|
|
a1792d |
+ </goals>
|
|
|
a1792d |
+ <configuration>
|
|
|
a1792d |
+ <artifactItems>
|
|
|
a1792d |
+ <artifactItem>
|
|
|
a1792d |
+ <groupId>org.wildfly</groupId>
|
|
|
a1792d |
+ <artifactId>wildfly-dist</artifactId>
|
|
|
a1792d |
+ <version>${as-version}</version>
|
|
|
a1792d |
+ <type>zip</type>
|
|
|
a1792d |
+ <overWrite>false</overWrite>
|
|
|
a1792d |
+ <outputDirectory>target</outputDirectory>
|
|
|
a1792d |
+ </artifactItem>
|
|
|
a1792d |
+ </artifactItems>
|
|
|
a1792d |
+ </configuration>
|
|
|
a1792d |
+ </execution>
|
|
|
a1792d |
+ </executions>
|
|
|
a1792d |
+ </plugin>
|
|
|
a1792d |
+ <plugin>
|
|
|
a1792d |
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
a1792d |
+ <artifactId>maven-antrun-plugin</artifactId>
|
|
|
a1792d |
+ <version>1.6</version>
|
|
|
a1792d |
+ <executions>
|
|
|
a1792d |
+ <execution>
|
|
|
a1792d |
+ <id>unpack resteasy</id>
|
|
|
a1792d |
+ <phase>process-test-classes</phase>
|
|
|
a1792d |
+ <configuration>
|
|
|
a1792d |
+ <target>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ dest="${project.build.directory}/wildfly-${as-version}/modules/system/layers/base"
|
|
|
a1792d |
+ overwrite="true" />
|
|
|
a1792d |
+ </target>
|
|
|
a1792d |
+ </configuration>
|
|
|
a1792d |
+ <goals>
|
|
|
a1792d |
+ <goal>run</goal>
|
|
|
a1792d |
+ </goals>
|
|
|
a1792d |
+ </execution>
|
|
|
a1792d |
+ </executions>
|
|
|
a1792d |
+ </plugin>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <plugin>
|
|
|
a1792d |
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
a1792d |
+ <artifactId>maven-war-plugin</artifactId>
|
|
|
a1792d |
+ <configuration>
|
|
|
a1792d |
+ <archive>
|
|
|
a1792d |
+ <manifestEntries>
|
|
|
a1792d |
+ <Dependencies>
|
|
|
a1792d |
+ javax.xml.bind.api
|
|
|
a1792d |
+ </Dependencies>
|
|
|
a1792d |
+ </manifestEntries>
|
|
|
a1792d |
+ </archive>
|
|
|
a1792d |
+ </configuration>
|
|
|
a1792d |
+ </plugin>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ </plugins>
|
|
|
a1792d |
+ </build>
|
|
|
a1792d |
+
|
|
|
a1792d |
+<dependencyManagement>
|
|
|
a1792d |
+ <dependencies>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.arquillian</groupId>
|
|
|
a1792d |
+ <artifactId>arquillian-bom</artifactId>
|
|
|
a1792d |
+ <version>1.0.3.Final</version>
|
|
|
a1792d |
+ <scope>import</scope>
|
|
|
a1792d |
+ <type>pom</type>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ </dependencies>
|
|
|
a1792d |
+</dependencyManagement>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <dependencies>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.spec</groupId>
|
|
|
a1792d |
+ <artifactId>jboss-javaee-6.0</artifactId>
|
|
|
a1792d |
+ <version>1.0.0.Final</version>
|
|
|
a1792d |
+ <type>pom</type>
|
|
|
a1792d |
+ <scope>provided</scope>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>junit</groupId>
|
|
|
a1792d |
+ <artifactId>junit</artifactId>
|
|
|
a1792d |
+ <version>4.8.1</version>
|
|
|
a1792d |
+ <scope>test</scope>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.arquillian.junit</groupId>
|
|
|
a1792d |
+ <artifactId>arquillian-junit-container</artifactId>
|
|
|
a1792d |
+ <scope>test</scope>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.wildfly</groupId>
|
|
|
a1792d |
+ <artifactId>wildfly-arquillian-container-managed</artifactId>
|
|
|
a1792d |
+ <version>8.0.0.Alpha1</version>
|
|
|
a1792d |
+ <scope>test</scope>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.arquillian.protocol</groupId>
|
|
|
a1792d |
+ <artifactId>arquillian-protocol-servlet</artifactId>
|
|
|
a1792d |
+ <scope>test</scope>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.resteasy</groupId>
|
|
|
a1792d |
+ <artifactId>jaxrs-api</artifactId>
|
|
|
a1792d |
+ <version>${project.version}</version>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.resteasy</groupId>
|
|
|
a1792d |
+ <artifactId>resteasy-jaxrs</artifactId>
|
|
|
a1792d |
+ <version>${project.version}</version>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.resteasy</groupId>
|
|
|
a1792d |
+ <artifactId>resteasy-validator-provider-11</artifactId>
|
|
|
a1792d |
+ <version>${project.version}</version>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>javax.validation</groupId>
|
|
|
a1792d |
+ <artifactId>validation-api</artifactId>
|
|
|
a1792d |
+ <version>1.1.0.Final</version>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.hibernate</groupId>
|
|
|
a1792d |
+ <artifactId>hibernate-validator</artifactId>
|
|
|
a1792d |
+ <version>5.0.1.Final</version>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>javax.el</groupId>
|
|
|
a1792d |
+ <artifactId>javax.el-api</artifactId>
|
|
|
a1792d |
+ <version>2.2.4</version>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.glassfish.web</groupId>
|
|
|
a1792d |
+ <artifactId>javax.el</artifactId>
|
|
|
a1792d |
+ <version>2.2.4</version>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+<dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.spec.javax.xml.bind</groupId>
|
|
|
a1792d |
+ <artifactId>jboss-jaxb-api_2.2_spec</artifactId>
|
|
|
a1792d |
+ <version>1.0.4.Final</version>
|
|
|
a1792d |
+</dependency>
|
|
|
a1792d |
+ <dependency>
|
|
|
a1792d |
+ <groupId>org.jboss.resteasy</groupId>
|
|
|
a1792d |
+ <artifactId>resteasy-jaxb-provider</artifactId>
|
|
|
a1792d |
+ <version>${project.version}</version>
|
|
|
a1792d |
+ <scope>test</scope>
|
|
|
a1792d |
+ </dependency>
|
|
|
a1792d |
+ </dependencies>
|
|
|
a1792d |
+</project>
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestApplication.java resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestApplication.java
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestApplication.java 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestApplication.java 2014-07-25 15:40:28.833658314 -0400
|
|
|
a1792d |
@@ -0,0 +1,16 @@
|
|
|
a1792d |
+package org.jboss.resteasy.resteasy1073;
|
|
|
a1792d |
+
|
|
|
a1792d |
+import java.util.HashSet;
|
|
|
a1792d |
+import java.util.Set;
|
|
|
a1792d |
+
|
|
|
a1792d |
+import javax.ws.rs.core.Application;
|
|
|
a1792d |
+
|
|
|
a1792d |
+public class TestApplication extends Application
|
|
|
a1792d |
+{
|
|
|
a1792d |
+ @Override
|
|
|
a1792d |
+ public Set<Class<?>> getClasses() {
|
|
|
a1792d |
+ HashSet<Class<?>> set = new HashSet<Class<?>>();
|
|
|
a1792d |
+ set.add(TestResource.class);
|
|
|
a1792d |
+ return set;
|
|
|
a1792d |
+ }
|
|
|
a1792d |
+}
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestResource.java resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestResource.java
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestResource.java 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestResource.java 2014-07-25 15:41:14.393770993 -0400
|
|
|
a1792d |
@@ -0,0 +1,26 @@
|
|
|
a1792d |
+package org.jboss.resteasy.resteasy1073;
|
|
|
a1792d |
+
|
|
|
a1792d |
+import javax.ws.rs.Consumes;
|
|
|
a1792d |
+import javax.ws.rs.POST;
|
|
|
a1792d |
+import javax.ws.rs.Path;
|
|
|
a1792d |
+import javax.ws.rs.core.MediaType;
|
|
|
a1792d |
+
|
|
|
a1792d |
+/**
|
|
|
a1792d |
+* RESTEASY-1073
|
|
|
a1792d |
+*
|
|
|
a1792d |
+* @author Ron Sigal
|
|
|
a1792d |
+* @version $Revision: 1.1 $
|
|
|
a1792d |
+*
|
|
|
a1792d |
+* Copyright July 19, 2014
|
|
|
a1792d |
+*/
|
|
|
a1792d |
+@Path("")
|
|
|
a1792d |
+public class TestResource
|
|
|
a1792d |
+{
|
|
|
a1792d |
+ @POST
|
|
|
a1792d |
+ @Path("test")
|
|
|
a1792d |
+ @Consumes(MediaType.APPLICATION_XML)
|
|
|
a1792d |
+ public String post(TestWrapper wrapper)
|
|
|
a1792d |
+ {
|
|
|
a1792d |
+ return wrapper.getName();
|
|
|
a1792d |
+ }
|
|
|
a1792d |
+}
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestWrapper.java resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestWrapper.java
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestWrapper.java 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/main/java/org/jboss/resteasy/resteasy1073/TestWrapper.java 2014-07-25 15:41:52.762865571 -0400
|
|
|
a1792d |
@@ -0,0 +1,17 @@
|
|
|
a1792d |
+package org.jboss.resteasy.resteasy1073;
|
|
|
a1792d |
+
|
|
|
a1792d |
+import javax.xml.bind.annotation.XmlRootElement;
|
|
|
a1792d |
+
|
|
|
a1792d |
+@XmlRootElement
|
|
|
a1792d |
+public class TestWrapper
|
|
|
a1792d |
+{
|
|
|
a1792d |
+ private String name;
|
|
|
a1792d |
+ public String getName()
|
|
|
a1792d |
+ {
|
|
|
a1792d |
+ return name;
|
|
|
a1792d |
+ }
|
|
|
a1792d |
+ public void setName(String name)
|
|
|
a1792d |
+ {
|
|
|
a1792d |
+ this.name = name;
|
|
|
a1792d |
+ }
|
|
|
a1792d |
+}
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/java/org/jboss/resteasy/test/resteasy1073/TestExternalParameterEntity.java resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/java/org/jboss/resteasy/test/resteasy1073/TestExternalParameterEntity.java
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/java/org/jboss/resteasy/test/resteasy1073/TestExternalParameterEntity.java 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/java/org/jboss/resteasy/test/resteasy1073/TestExternalParameterEntity.java 2014-07-25 15:43:11.465058832 -0400
|
|
|
a1792d |
@@ -0,0 +1,96 @@
|
|
|
a1792d |
+package org.jboss.resteasy.test.resteasy1073;
|
|
|
a1792d |
+
|
|
|
a1792d |
+import java.io.File;
|
|
|
a1792d |
+
|
|
|
a1792d |
+import javax.ws.rs.core.MediaType;
|
|
|
a1792d |
+
|
|
|
a1792d |
+import junit.framework.Assert;
|
|
|
a1792d |
+
|
|
|
a1792d |
+import org.jboss.arquillian.container.test.api.Deployment;
|
|
|
a1792d |
+import org.jboss.arquillian.junit.Arquillian;
|
|
|
a1792d |
+import org.jboss.resteasy.client.ClientRequest;
|
|
|
a1792d |
+import org.jboss.resteasy.client.ClientResponse;
|
|
|
a1792d |
+import org.jboss.resteasy.resteasy1073.TestApplication;
|
|
|
a1792d |
+import org.jboss.resteasy.resteasy1073.TestResource;
|
|
|
a1792d |
+import org.jboss.resteasy.resteasy1073.TestWrapper;
|
|
|
a1792d |
+import org.jboss.shrinkwrap.api.Archive;
|
|
|
a1792d |
+import org.jboss.shrinkwrap.api.ShrinkWrap;
|
|
|
a1792d |
+import org.jboss.shrinkwrap.api.spec.WebArchive;
|
|
|
a1792d |
+import org.junit.Test;
|
|
|
a1792d |
+import org.junit.runner.RunWith;
|
|
|
a1792d |
+
|
|
|
a1792d |
+/**
|
|
|
a1792d |
+ * RESTEASY-1073.
|
|
|
a1792d |
+ *
|
|
|
a1792d |
+ * @author Ron Sigal
|
|
|
a1792d |
+ * @version $Revision: 1.1 $
|
|
|
a1792d |
+ *
|
|
|
a1792d |
+ * Created July 19, 2014
|
|
|
a1792d |
+ */
|
|
|
a1792d |
+@RunWith(Arquillian.class)
|
|
|
a1792d |
+public class TestExternalParameterEntity
|
|
|
a1792d |
+{
|
|
|
a1792d |
+ @Deployment(name="war_expand", order=1)
|
|
|
a1792d |
+ public static Archive createTestArchive1()
|
|
|
a1792d |
+ {
|
|
|
a1792d |
+ WebArchive war = ShrinkWrap.create(WebArchive.class, "RESTEASY-1073-expand.war")
|
|
|
a1792d |
+ .addClasses(TestApplication.class)
|
|
|
a1792d |
+ .addClasses(TestResource.class, TestWrapper.class)
|
|
|
a1792d |
+ .addAsWebInfResource("web_expand.xml", "web.xml")
|
|
|
a1792d |
+ ;
|
|
|
a1792d |
+ System.out.println(war.toString(true));
|
|
|
a1792d |
+ return war;
|
|
|
a1792d |
+ }
|
|
|
a1792d |
+
|
|
|
a1792d |
+ @Deployment(name="war_no_expand", order=2)
|
|
|
a1792d |
+ public static Archive createTestArchive2()
|
|
|
a1792d |
+ {
|
|
|
a1792d |
+ WebArchive war = ShrinkWrap.create(WebArchive.class, "RESTEASY-1073-no-expand.war")
|
|
|
a1792d |
+ .addClasses(TestApplication.class)
|
|
|
a1792d |
+ .addClasses(TestResource.class, TestWrapper.class)
|
|
|
a1792d |
+ .addAsWebInfResource("web_no_expand.xml", "web.xml")
|
|
|
a1792d |
+ ;
|
|
|
a1792d |
+ System.out.println(war.toString(true));
|
|
|
a1792d |
+ return war;
|
|
|
a1792d |
+ }
|
|
|
a1792d |
+
|
|
|
a1792d |
+ private String passwdFile = new File("src/test/resources/passwd").getAbsolutePath();
|
|
|
a1792d |
+ private String dtdFile = new File("src/test/resources/test.dtd").getAbsolutePath();
|
|
|
a1792d |
+
|
|
|
a1792d |
+ private String text =
|
|
|
a1792d |
+"
|
|
|
a1792d |
+" \r" +
|
|
|
a1792d |
+" \r" +
|
|
|
a1792d |
+" \">\r" +
|
|
|
a1792d |
+" \r" +
|
|
|
a1792d |
+"%dtd;\r" +
|
|
|
a1792d |
+"]>\r" +
|
|
|
a1792d |
+"<testWrapper><name>&xx;;</name></testWrapper>";
|
|
|
a1792d |
+
|
|
|
a1792d |
+ @Test
|
|
|
a1792d |
+ public void testExternalParameterEntityExpand() throws Exception
|
|
|
a1792d |
+ {
|
|
|
a1792d |
+ ClientRequest request = new ClientRequest("http://localhost:8080/RESTEASY-1073-expand/test");
|
|
|
a1792d |
+ System.out.println(text);
|
|
|
a1792d |
+ request.body(MediaType.APPLICATION_XML, text);
|
|
|
a1792d |
+ ClientResponse response = request.post();
|
|
|
a1792d |
+ Assert.assertEquals(200, response.getStatus());
|
|
|
a1792d |
+ String entity = response.getEntity(String.class);
|
|
|
a1792d |
+ System.out.println("Result: " + entity);
|
|
|
a1792d |
+ Assert.assertEquals("root:x:0:0:root:/root:/bin/bash", entity.trim());
|
|
|
a1792d |
+ }
|
|
|
a1792d |
+
|
|
|
a1792d |
+ @Test
|
|
|
a1792d |
+ public void testExternalParameterEntityNoExpand() throws Exception
|
|
|
a1792d |
+ {
|
|
|
a1792d |
+ ClientRequest request = new ClientRequest("http://localhost:8080/RESTEASY-1073-no-expand/test");
|
|
|
a1792d |
+ System.out.println(text);
|
|
|
a1792d |
+ request.body(MediaType.APPLICATION_XML, text);
|
|
|
a1792d |
+ ClientResponse response = request.post();
|
|
|
a1792d |
+ Assert.assertEquals(200, response.getStatus());
|
|
|
a1792d |
+ String entity = response.getEntity(String.class);
|
|
|
a1792d |
+ System.out.println("Result: " + entity);
|
|
|
a1792d |
+ Assert.assertEquals("", entity.trim());
|
|
|
a1792d |
+ }
|
|
|
a1792d |
+}
|
|
|
a1792d |
+
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/arquillian.xml resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/arquillian.xml
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/arquillian.xml 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/arquillian.xml 2014-07-25 15:44:43.551284000 -0400
|
|
|
a1792d |
@@ -0,0 +1,23 @@
|
|
|
a1792d |
+
|
|
|
a1792d |
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
a1792d |
+ xsi:schemaLocation="
|
|
|
a1792d |
+http://jboss.org/schema/arquillian
|
|
|
a1792d |
+http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
|
|
|
a1792d |
+
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <defaultProtocol type="Servlet 3.0" />
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <engine>
|
|
|
a1792d |
+ <property name="deploymentExportPath">target/deployments</property>
|
|
|
a1792d |
+ </engine>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <container qualifier="jbossas-managed" default="true">
|
|
|
a1792d |
+ <configuration>
|
|
|
a1792d |
+ <property name="jbossHome">target/wildfly-8.0.0.Final</property>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <property name="serverConfig">standalone-full.xml</property>
|
|
|
a1792d |
+
|
|
|
a1792d |
+
|
|
|
a1792d |
+ </configuration>
|
|
|
a1792d |
+ </container>
|
|
|
a1792d |
+</arquillian>
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/passwd resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/passwd
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/passwd 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/passwd 2014-07-25 15:49:38.648001614 -0400
|
|
|
a1792d |
@@ -0,0 +1 @@
|
|
|
a1792d |
+root:x:0:0:root:/root:/bin/bash
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/test.dtd resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/test.dtd
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/test.dtd 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/test.dtd 2014-07-25 15:50:14.822089344 -0400
|
|
|
a1792d |
@@ -0,0 +1 @@
|
|
|
a1792d |
+
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/web_expand.xml resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/web_expand.xml
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/web_expand.xml 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/web_expand.xml 2014-07-25 15:50:50.589177751 -0400
|
|
|
a1792d |
@@ -0,0 +1,29 @@
|
|
|
a1792d |
+
|
|
|
a1792d |
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
a1792d |
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <display-name>RESTEASY-1073-Expand</display-name>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <context-param>
|
|
|
a1792d |
+ <param-name>resteasy.document.expand.entity.references</param-name>
|
|
|
a1792d |
+ <param-value>true</param-value>
|
|
|
a1792d |
+ </context-param>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <servlet>
|
|
|
a1792d |
+ <servlet-name>Resteasy</servlet-name>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <servlet-class>
|
|
|
a1792d |
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
|
|
|
a1792d |
+ </servlet-class>
|
|
|
a1792d |
+ <init-param>
|
|
|
a1792d |
+ <param-name>javax.ws.rs.Application</param-name>
|
|
|
a1792d |
+ <param-value>org.jboss.resteasy.resteasy1073.TestApplication</param-value>
|
|
|
a1792d |
+ </init-param>
|
|
|
a1792d |
+ </servlet>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <servlet-mapping>
|
|
|
a1792d |
+ <servlet-name>Resteasy</servlet-name>
|
|
|
a1792d |
+ <url-pattern>/*</url-pattern>
|
|
|
a1792d |
+ </servlet-mapping>
|
|
|
a1792d |
+
|
|
|
a1792d |
+</web-app>
|
|
|
abf604 |
diff -Nurb resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/web_no_expand.xml resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/web_no_expand.xml
|
|
|
abf604 |
--- resteasy-3.0.6.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/web_no_expand.xml 1969-12-31 19:00:00.000000000 -0500
|
|
|
abf604 |
+++ resteasy-2.3.5.Final/jaxrs/arquillian/RESTEASY-1073-WF8/src/test/resources/web_no_expand.xml 2014-07-25 15:51:27.218270317 -0400
|
|
|
a1792d |
@@ -0,0 +1,29 @@
|
|
|
a1792d |
+
|
|
|
a1792d |
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
a1792d |
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <display-name>RESTEASY-1073-NoExpand</display-name>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <context-param>
|
|
|
a1792d |
+ <param-name>resteasy.document.expand.entity.references</param-name>
|
|
|
a1792d |
+ <param-value>false</param-value>
|
|
|
a1792d |
+ </context-param>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <servlet>
|
|
|
a1792d |
+ <servlet-name>Resteasy</servlet-name>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <servlet-class>
|
|
|
a1792d |
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
|
|
|
a1792d |
+ </servlet-class>
|
|
|
a1792d |
+ <init-param>
|
|
|
a1792d |
+ <param-name>javax.ws.rs.Application</param-name>
|
|
|
a1792d |
+ <param-value>org.jboss.resteasy.resteasy1073.TestApplication</param-value>
|
|
|
a1792d |
+ </init-param>
|
|
|
a1792d |
+ </servlet>
|
|
|
a1792d |
+
|
|
|
a1792d |
+ <servlet-mapping>
|
|
|
a1792d |
+ <servlet-name>Resteasy</servlet-name>
|
|
|
a1792d |
+ <url-pattern>/*</url-pattern>
|
|
|
a1792d |
+ </servlet-mapping>
|
|
|
a1792d |
+
|
|
|
a1792d |
+</web-app>
|
|
|
abf604 |
diff -up Resteasy-3.0.6.Final/jaxrs/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/ExternalEntityUnmarshaller.java.orig11 Resteasy-3.0.6.Final/jaxrs/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/ExternalEntityUnmarshaller.java
|
|
|
abf604 |
--- Resteasy-3.0.6.Final/jaxrs/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/ExternalEntityUnmarshaller.java.orig11 2014-09-08 01:47:47.756852292 -0400
|
|
|
abf604 |
+++ Resteasy-3.0.6.Final/jaxrs/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/ExternalEntityUnmarshaller.java 2014-09-08 01:48:37.604972096 -0400
|
|
|
abf604 |
@@ -154,6 +154,7 @@ public class ExternalEntityUnmarshaller
|
|
|
abf604 |
XMLReader xmlReader = sp.getXMLReader();
|
|
|
a1792d |
xmlReader.setFeature("http://xml.org/sax/features/validation", false);
|
|
|
a1792d |
xmlReader.setFeature("http://xml.org/sax/features/external-general-entities", false);
|
|
|
a1792d |
+ xmlReader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
|
|
|
a1792d |
SAXSource saxSource = new SAXSource(xmlReader, source);
|
|
|
a1792d |
return delegate.unmarshal(saxSource);
|
|
|
a1792d |
}
|
|
|
abf604 |
@@ -198,6 +199,7 @@ public class ExternalEntityUnmarshaller
|
|
|
abf604 |
XMLReader xmlReader = sp.getXMLReader();
|
|
|
a1792d |
xmlReader.setFeature("http://xml.org/sax/features/validation", false);
|
|
|
a1792d |
xmlReader.setFeature("http://xml.org/sax/features/external-general-entities", false);
|
|
|
a1792d |
+ xmlReader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
|
|
|
a1792d |
((SAXSource) source).setXMLReader(xmlReader);
|
|
|
a1792d |
return delegate.unmarshal(source, declaredType);
|
|
|
a1792d |
}
|
|
|
abf604 |
diff -up Resteasy-3.0.6.Final/jaxrs/arquillian/pom.xml.orig11 Resteasy-3.0.6.Final/jaxrs/arquillian/pom.xml
|
|
|
abf604 |
--- Resteasy-3.0.6.Final/jaxrs/arquillian/pom.xml.orig11 2014-09-08 01:54:49.780400392 -0400
|
|
|
abf604 |
+++ Resteasy-3.0.6.Final/jaxrs/arquillian/pom.xml 2014-09-08 01:55:22.955814600 -0400
|
|
|
abf604 |
@@ -21,6 +21,7 @@
|
|
|
abf604 |
|
|
|
abf604 |
|
|
|
abf604 |
<module>ValidationTest-AS7</module>
|
|
|
abf604 |
+ <module>RESTEASY-1073-WF8</module>
|
|
|
abf604 |
</modules>
|
|
|
abf604 |
|
|
|
abf604 |
<artifactId>arquillian</artifactId>
|