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

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


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

commit 1ac2f02d81da3acd81582e989c6d4b9c12228321
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 a0e5c0954c..9d41368343 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -681,6 +681,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 d6aea358f0..aeec28388f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -215,6 +215,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