cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6766] Optionally disabling the secure processing in XSLTJaxbProvider, patch from Vjacheslav Borisov applied
Date Wed, 03 Feb 2016 10:26:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 62ebb2a0b -> 63b1ab0b2


[CXF-6766] Optionally disabling the secure processing in XSLTJaxbProvider, patch from Vjacheslav
Borisov applied


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/63b1ab0b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/63b1ab0b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/63b1ab0b

Branch: refs/heads/master
Commit: 63b1ab0b25db150cf8e3e5e697f2cfe24105dd4b
Parents: 62ebb2a
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Feb 3 10:25:55 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Feb 3 10:25:55 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/63b1ab0b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
index dd92978..0aa9931 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
@@ -109,6 +109,7 @@ public class XSLTJaxbProvider<T> extends JAXBElementProvider<T>
{
     
     private boolean supportJaxbOnly;
     private boolean refreshTemplates;
+    private boolean secureProcessing = true;
     
     public void setSupportJaxbOnly(boolean support) {
         this.supportJaxbOnly = support;
@@ -521,7 +522,7 @@ public class XSLTJaxbProvider<T> extends JAXBElementProvider<T>
{
             source.setSystemId(urlStream.toExternalForm());
             if (factory == null) {
                 factory = (SAXTransformerFactory)TransformerFactory.newInstance();
-                factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
+                factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, secureProcessing);
                 if (uriResolver != null) {
                     factory.setURIResolver(uriResolver);
                 }
@@ -538,6 +539,10 @@ public class XSLTJaxbProvider<T> extends JAXBElementProvider<T>
{
         this.refreshTemplates = refresh;
     }
 
+    public void setSecureProcessing(boolean secureProcessing) {
+        this.secureProcessing = secureProcessing;
+    }
+
     private static class TemplatesImpl implements Templates {
 
         private Templates templates;


Mime
View raw message