tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1792957 - in /tomcat/trunk: java/org/apache/coyote/AbstractProtocol.java webapps/docs/changelog.xml
Date Thu, 27 Apr 2017 20:49:33 GMT
Author: markt
Date: Thu Apr 27 20:49:32 2017
New Revision: 1792957

URL: http://svn.apache.org/viewvc?rev=1792957&view=rev
Log:
Wildcard host names need quoting since '*' is a reserved character in an ObjectName.

Modified:
    tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1792957&r1=1792956&r2=1792957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Thu Apr 27 20:49:32 2017
@@ -552,13 +552,13 @@ public abstract class AbstractProtocol<S
 
             for (SSLHostConfig sslHostConfig : getEndpoint().findSslHostConfigs()) {
                 ObjectName sslOname = new ObjectName(domain + ":type=SSLHostConfig,ThreadPool="
+
-                        getName() + ",name=" + sslHostConfig.getHostName());
+                        getName() + ",name=" + ObjectName.quote(sslHostConfig.getHostName()));
                 Registry.getRegistry(null, null).registerComponent(sslHostConfig, sslOname,
null);
                 sslOnames.add(sslOname);
                 for (SSLHostConfigCertificate sslHostConfigCert : sslHostConfig.getCertificates())
{
                     ObjectName sslCertOname = new ObjectName(domain +
                             ":type=SSLHostConfigCertificate,ThreadPool=" + getName() +
-                            ",Host=" + sslHostConfig.getHostName() +
+                            ",Host=" + ObjectName.quote(sslHostConfig.getHostName()) +
                             ",name=" + sslHostConfigCert.getType());
                     Registry.getRegistry(null, null).registerComponent(
                             sslHostConfigCert, sslCertOname, null);

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1792957&r1=1792956&r2=1792957&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Apr 27 20:49:32 2017
@@ -65,6 +65,12 @@
         Avoid a <code>NullPointerException</code> when reading attributes for
a
         initialised HTTP connector where TLS is enabled. (markt)
       </fix>
+      <fix>
+        If a wild card <code>hostName</code> is configured for a
+        <code>SSLHostConfig</code> element, quote the host name when using it
as
+        part of a JMX object name to avoid errors that prevent the associated
+        TLS connector from starting. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message