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

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


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

commit 3d2e7e636e2172d3eb83de1df0b3daa5e8880585
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 30d4fb8b11..ad2a52cadd 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -929,6 +929,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 e680dfa14e..1508835008 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -390,6 +390,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