]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1775827 from 2.4.x:
authorEric Covener <covener@apache.org>
Tue, 3 Jan 2017 23:58:30 +0000 (23:58 +0000)
committerEric Covener <covener@apache.org>
Tue, 3 Jan 2017 23:58:30 +0000 (23:58 +0000)
Merge r1775199, r1775664 from trunk:

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.2.x-merge-http-strict@1777247 13f79535-47bb-0310-9956-ffa450edef68

server/vhost.c

index c38b9368eb159457711e6aaab9ec43b60618de1d..51b17f9032deb7d5a749c809bd64f2a99fea59df 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] == '.') {