resteasy/0003-resteasy-cve-2014-3490.patch
Ade Lee 30ec87c0dc Fix for CVE-2014-3490
Fix for BZ 1172824
2014-12-10 15:37:09 -05:00

20 lines
1.6 KiB
Diff

diff -up Resteasy-3.0.6.Final/jaxrs/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/ExternalEntityUnmarshaller.java.1073 Resteasy-3.0.6.Final/jaxrs/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/ExternalEntityUnmarshaller.java
--- Resteasy-3.0.6.Final/jaxrs/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/ExternalEntityUnmarshaller.java.1073 2014-09-29 17:44:28.776812688 -0400
+++ Resteasy-3.0.6.Final/jaxrs/providers/jaxb/src/main/java/org/jboss/resteasy/plugins/providers/jaxb/ExternalEntityUnmarshaller.java 2014-09-29 17:47:52.202425895 -0400
@@ -154,6 +154,7 @@ public class ExternalEntityUnmarshaller
XMLReader xmlReader = sp.getXMLReader();
xmlReader.setFeature("http://xml.org/sax/features/validation", false);
xmlReader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ xmlReader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
SAXSource saxSource = new SAXSource(xmlReader, source);
return delegate.unmarshal(saxSource);
}
@@ -198,6 +199,7 @@ public class ExternalEntityUnmarshaller
XMLReader xmlReader = sp.getXMLReader();
xmlReader.setFeature("http://xml.org/sax/features/validation", false);
xmlReader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ xmlReader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
((SAXSource) source).setXMLReader(xmlReader);
return delegate.unmarshal(source, declaredType);
}