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

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


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

commit 932cbfd1def842090fccc44f727ec6631358029f
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 b44de4d433..95b9996eb4 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -664,6 +664,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 598f0950ad..a03d818535 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -208,6 +208,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