This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch activemq-6.1.x
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/activemq-6.1.x by this push:
     new 2f6cf7cc32 AMQ-9771: Enable security features when building XML Schema 
in activemq-runtime-config. (#1498)
2f6cf7cc32 is described below

commit 2f6cf7cc3270aed486e9f7f8bb166811ffdb7df0
Author: Sérgio Lemos <[email protected]>
AuthorDate: Thu Sep 18 04:18:21 2025 -0700

    AMQ-9771: Enable security features when building XML Schema in 
activemq-runtime-config. (#1498)
    
    (cherry picked from commit 57b05b9e1bf40c61784dedbb1adf3e1b99faed93)
---
 .../java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
 
b/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
index e0d3d80ccc..b7342f417d 100644
--- 
a/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
+++ 
b/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
@@ -228,8 +228,9 @@ public class RuntimeConfigurationBroker extends 
AbstractRuntimeConfigurationBrok
 
     private Schema getSchema() throws SAXException, IOException {
         if (schema == null) {
-            SchemaFactory schemaFactory = SchemaFactory.newInstance(
-                    XMLConstants.W3C_XML_SCHEMA_NS_URI);
+            SchemaFactory schemaFactory = 
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+            
schemaFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl";,
 true);
+            schemaFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, 
true);
 
             ArrayList<StreamSource> schemas = new ArrayList<StreamSource>();
             schemas.add(new 
StreamSource(getClass().getResource("/activemq.xsd").toExternalForm()));


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to