You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "asoldano (via GitHub)" <gi...@apache.org> on 2025/09/02 12:13:09 UTC
Re: [PR] [CXF-9160] Include JBoss Remoting protocols in the whitelist of JNDI protocols [cxf]
asoldano commented on code in PR #2566:
URL: https://github.com/apache/cxf/pull/2566#discussion_r2315891132
##########
rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JndiHelper.java:
##########
@@ -18,21 +18,48 @@
*/
package org.apache.cxf.transport.jms.util;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.Properties;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
+import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.common.util.SystemPropertyAction;
+
public class JndiHelper {
- private static final List<String> ALLOWED_PROTOCOLS = Arrays.asList(
- "vm://", "tcp://", "nio://", "ssl://", "http://", "https://", "ws://", "wss://");
+ /**
+ * JVM/System property name holding allowed jms protocols.
+ */
+ private static final String CONFIGURED_JMS_PROTOCOLS = "jms.protocols";
+ /**
+ * JVM/System property name holding default allowed jms protocols.
+ */
+ private static final String DEFAULT_JMS_PROTOCOLS = "vm,tcp,nio,ssl,http,https,ws,wss";
Review Comment:
The default protocol list in the new system property ("vm,tcp,...") omits the :// suffix that was present in the original hardcoded list ("vm://", "tcp://", ...). Perhaps it's not a major issue, but this would make the check less strict/secure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org