Skip to content

Commit

Permalink
Only allow strings to be passed to JMX authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
driftx committed Aug 27, 2020
1 parent 3f74a9c commit e779e82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/java/org/apache/cassandra/service/CassandraDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ private void maybeInitJmx()

System.setProperty("java.rmi.server.hostname", InetAddress.getLoopbackAddress().getHostAddress());
RMIServerSocketFactory serverFactory = new RMIServerSocketFactoryImpl();
Map<String, ?> env = Collections.singletonMap(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, serverFactory);
Map<String, Object> env = Collections.singletonMap(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, serverFactory);
env.put("jmx.remote.rmi.server.credential.types",
new String[] { String[].class.getName(), String.class.getName() });
try
{
Registry registry = new JmxRegistry(Integer.valueOf(jmxPort), null, serverFactory, "jmxrmi");
Expand Down

0 comments on commit e779e82

Please sign in to comment.