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:27:15 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes fc05b9e52 -> 71206b61a


[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/71206b61
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/71206b61
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/71206b61

Branch: refs/heads/3.1.x-fixes
Commit: 71206b61a517f306e43de2320b05c7ffe06969c2
Parents: fc05b9e
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:26:54 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/71206b61/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