8049514: FEATURE_SECURE_PROCESSING can not be turned off on a validator through SchemaFactory
authorjoehw
Wed, 16 Jul 2014 18:17:27 -0700
changeset 25592 208039591441
parent 25591 8382d4909d6a
child 25593 ba581cb2983f
child 25680 3a4b99c550c1
8049514: FEATURE_SECURE_PROCESSING can not be turned off on a validator through SchemaFactory Reviewed-by: lancea
jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java
--- a/jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Wed Jan 22 09:37:54 2014 -0800
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Wed Jul 16 18:17:27 2014 -0700
@@ -452,7 +452,8 @@
     }
 
     private void propagateFeatures(AbstractXMLSchema schema) {
-        schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, fSecurityManager != null);
+        schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,
+                (fSecurityManager != null && fSecurityManager.isSecureProcessing()));
         schema.setFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM, fUseServicesMechanism);
         String[] features = fXMLSchemaLoader.getRecognizedFeatures();
         for (int i = 0; i < features.length; ++i) {