Author: mrglavas
Date: Tue Apr 13 12:39:13 2010
New Revision: 933582

URL: http://svn.apache.org/viewvc?rev=933582&view=rev
Log:
Secure processing: If a SecurityManager was set on the Validator we need to 
propagate it to the parser which handles the StreamSources.

Modified:
    
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/StreamValidatorHelper.java

Modified: 
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/StreamValidatorHelper.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/validation/StreamValidatorHelper.java?rev=933582&r1=933581&r2=933582&view=diff
==============================================================================
--- 
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/StreamValidatorHelper.java
 (original)
+++ 
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/StreamValidatorHelper.java
 Tue Apr 13 12:39:13 2010
@@ -83,6 +83,10 @@ final class StreamValidatorHelper implem
     private static final String VALIDATION_MANAGER =
         Constants.XERCES_PROPERTY_PREFIX + 
Constants.VALIDATION_MANAGER_PROPERTY;
     
+    /** Property identifier: security manager. */
+    private static final String SECURITY_MANAGER =
+        Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY;
+    
     //
     // Data
     //
@@ -130,6 +134,7 @@ final class StreamValidatorHelper implem
             else if (fComponentManager.getFeature(PARSER_SETTINGS)) {
                 config.setProperty(ENTITY_RESOLVER, 
fComponentManager.getProperty(ENTITY_RESOLVER));
                 config.setProperty(ERROR_HANDLER, 
fComponentManager.getProperty(ERROR_HANDLER));
+                config.setProperty(SECURITY_MANAGER, 
fComponentManager.getProperty(SECURITY_MANAGER));
             }
             
             // prepare for parse
@@ -212,6 +217,7 @@ final class StreamValidatorHelper implem
         }
         config.setProperty(SYMBOL_TABLE, 
fComponentManager.getProperty(SYMBOL_TABLE));
         config.setProperty(VALIDATION_MANAGER, 
fComponentManager.getProperty(VALIDATION_MANAGER));
+        config.setProperty(SECURITY_MANAGER, 
fComponentManager.getProperty(SECURITY_MANAGER));
         config.setDocumentHandler(fSchemaValidator);
         config.setDTDHandler(null);
         config.setDTDContentModelHandler(null);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to