src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java
Print this page
*** 31,41 ****
import com.sun.org.apache.xerces.internal.util.MessageFormatter;
import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings;
import com.sun.org.apache.xerces.internal.util.PropertyState;
import com.sun.org.apache.xerces.internal.util.SymbolTable;
import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
! import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler;
import com.sun.org.apache.xerces.internal.xni.XMLDTDHandler;
import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler;
import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool;
--- 31,41 ----
import com.sun.org.apache.xerces.internal.util.MessageFormatter;
import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings;
import com.sun.org.apache.xerces.internal.util.PropertyState;
import com.sun.org.apache.xerces.internal.util.SymbolTable;
import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
! import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager;
import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler;
import com.sun.org.apache.xerces.internal.xni.XMLDTDHandler;
import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler;
import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool;
*** 154,171 ****
/** Property identifier: Schema DV Factory */
protected static final String SCHEMA_DV_FACTORY =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
! /** Property identifier: access to external dtd */
! protected static final String ACCESS_EXTERNAL_DTD =
! XMLConstants.ACCESS_EXTERNAL_DTD;
- /** Property identifier: access to external schema */
- protected static final String ACCESS_EXTERNAL_SCHEMA =
- XMLConstants.ACCESS_EXTERNAL_SCHEMA;
-
//
// Data
//
XMLDocumentHandler fDocumentHandler;
--- 154,167 ----
/** Property identifier: Schema DV Factory */
protected static final String SCHEMA_DV_FACTORY =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
! /** Property identifier: Security property manager. */
! private static final String XML_SECURITY_PROPERTY_MANAGER =
! Constants.XML_SECURITY_PROPERTY_MANAGER;
//
// Data
//
XMLDocumentHandler fDocumentHandler;
*** 281,292 ****
GRAMMAR_POOL,
JAXP_SCHEMA_SOURCE,
JAXP_SCHEMA_LANGUAGE,
DTD_VALIDATOR_FACTORY_PROPERTY,
SCHEMA_DV_FACTORY,
! ACCESS_EXTERNAL_DTD,
! ACCESS_EXTERNAL_SCHEMA
};
addRecognizedProperties(recognizedProperties);
// set default values for normalization features
features |= NAMESPACES;
--- 277,287 ----
GRAMMAR_POOL,
JAXP_SCHEMA_SOURCE,
JAXP_SCHEMA_LANGUAGE,
DTD_VALIDATOR_FACTORY_PROPERTY,
SCHEMA_DV_FACTORY,
! XML_SECURITY_PROPERTY_MANAGER
};
addRecognizedProperties(recognizedProperties);
// set default values for normalization features
features |= NAMESPACES;
*** 316,334 ****
addComponent(manager);
fValidationManager = createValidationManager();
setProperty(VALIDATION_MANAGER, fValidationManager);
! //For DOM, the secure feature is set to true by default
! String accessExternal = SecuritySupport.getDefaultAccessProperty(
! Constants.SP_ACCESS_EXTERNAL_DTD, Constants.EXTERNAL_ACCESS_DEFAULT);
! setProperty(ACCESS_EXTERNAL_DTD, accessExternal);
- accessExternal = SecuritySupport.getDefaultAccessProperty(
- Constants.SP_ACCESS_EXTERNAL_SCHEMA, Constants.EXTERNAL_ACCESS_DEFAULT);
- setProperty(ACCESS_EXTERNAL_SCHEMA, accessExternal);
-
// add message formatters
if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
XMLMessageFormatter xmft = new XMLMessageFormatter();
fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft);
fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft);
--- 311,323 ----
addComponent(manager);
fValidationManager = createValidationManager();
setProperty(VALIDATION_MANAGER, fValidationManager);
! setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER,
! new XMLSecurityPropertyManager());
// add message formatters
if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
XMLMessageFormatter xmft = new XMLMessageFormatter();
fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft);
fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft);