]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1775199, r1775664 from trunk:
authorJim Jagielski <jim@apache.org>
Fri, 23 Dec 2016 12:34:28 +0000 (12:34 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 23 Dec 2016 12:34:28 +0000 (12:34 +0000)
Fix strict Host: header checking on EBCDIC

on zOS, isascii() really means 7 bit ascii, but our strings
are in ebcdic for 99.95% of the lifetime of the server.

remove initial isascii check entirely

We are already checking an even narrower set of characters
just below.

Submitted by: covener
Reviewed/backported by: jim

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

STATUS
server/vhost.c

diff --git a/STATUS b/STATUS
index d17e99f4d6ae4e1ae4642c215cc26b5fd1c8adfc..0aa7ea6d3a7441af22ab1531b19e15a1e7785fcb 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -119,11 +119,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) core: remove isascci check before narrower checks in vhost checking
-     trunk patch: http://svn.apache.org/r1775199
-                  http://svn.apache.org/r1775664
-     2.4.x patch: trunk works + CHANGES
-     +1: covener, jim, ylavic
 
   *) mod_http: Optimize bad headers handling workflow
      Trunk version of patch:
index 1896595653598a2dba758c54df86717f02854527..c4bd846f7d9f5e0e5903d22113bbacb629ff030e 100644 (file)
@@ -757,10 +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_isascii(*ch)) {
-            goto bad;
-        }
-        else if (apr_isalpha(*ch) || *ch == '-') {
+        if (apr_isalpha(*ch) || *ch == '-') {
             is_dotted_decimal = 0;
         }
         else if (ch[0] == '.') {