]> granicus.if.org Git - apache/commitdiff
Merge r1834318 from trunk:
authorEric Covener <covener@apache.org>
Mon, 2 Jul 2018 20:47:00 +0000 (20:47 +0000)
committerEric Covener <covener@apache.org>
Mon, 2 Jul 2018 20:47:00 +0000 (20:47 +0000)
Re-allow '_' (underscore) in hostnames.

'_' was not permitted in hostnames since 2.4.25's "HTTP Strict"
changes.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1834895 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/vhost.c

diff --git a/CHANGES b/CHANGES
index bb78a140ee3800fe00874b7f592688d568217daa..0b5817e3161431058c87be99b684b9f474888c2a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.34
+
+  *) core: Re-allow '_' (underscore) in hostnames.
+     [Eric Covener]
+
   *) mod_authz_core: If several parameters are used in a AuthzProviderAlias
      directive, if these parameters are not enclosed in quotation mark, only
      the first one is handled. The other ones are silently ignored.
index 5ad4efd3817de1f117d70ceaf28c78de2251d031..b23b2dd3179d22c52f50a1e2cb76305bbf913f88 100644 (file)
@@ -757,7 +757,7 @@ static apr_status_t strict_hostname_check(request_rec *r, char *host)
     int is_dotted_decimal = 1, leading_zeroes = 0, dots = 0;
 
     for (ch = host; *ch; ch++) {
-        if (apr_isalpha(*ch) || *ch == '-') {
+        if (apr_isalpha(*ch) || *ch == '-' || *ch == '_') {
             is_dotted_decimal = 0;
         }
         else if (ch[0] == '.') {