You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2025/09/18 11:18:27 UTC
(activemq) branch main updated: AMQ-9771: Enable security features when building XML Schema in activemq-runtime-config. (#1498)
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push:
new 57b05b9e1b AMQ-9771: Enable security features when building XML Schema in activemq-runtime-config. (#1498)
57b05b9e1b is described below
commit 57b05b9e1bf40c61784dedbb1adf3e1b99faed93
Author: Sérgio Lemos <le...@amazon.com>
AuthorDate: Thu Sep 18 04:18:21 2025 -0700
AMQ-9771: Enable security features when building XML Schema in activemq-runtime-config. (#1498)
---
.../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: commits-unsubscribe@activemq.apache.org
For additional commands, e-mail: commits-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact