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

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 6e8753f128 Allow for absolute host names in SNI checks.
6e8753f128 is described below

commit 6e8753f128cd9c85cc6248b9e4c06bcda7653990
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Sep 18 20:58:41 2026 +0100

    Allow for absolute host names in SNI checks.
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 3 +++
 webapps/docs/changelog.xml                            | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index d807e13de6..0e7f0150cc 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -930,6 +930,9 @@ public abstract class AbstractEndpoint<S, U> {
      *    protocol host name uses the default SSLHostConfig configuration, and 
false otherwise
      */
     public boolean checkSni(String sniHostName, String protocolHostName) {
+        if (protocolHostName != null && protocolHostName.endsWith(".")) {
+            protocolHostName = protocolHostName.substring(0, 
protocolHostName.length() - 1);
+        }
         return (!strictSni || !isSSLEnabled()
                 || (sniHostName != null && 
sniHostName.equalsIgnoreCase(protocolHostName))
                 || getSSLHostConfig(sniHostName) == getSSLHostConfig(
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cebc11ffa5..c0f46356d8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -214,6 +214,9 @@
         Fix possible TLS connections failures caused by one of the flags Tomcat
         uses to track TLS handshake progress not being correctly reset. (markt)
       </fix>
+      <fix>
+        Allow for absolute host names in SNI checks. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to