]> granicus.if.org Git - apache/commitdiff
Fix for vhosts where the hostname is followed by '.'
authorBrian Pane <brianp@apache.org>
Mon, 18 Mar 2002 01:43:17 +0000 (01:43 +0000)
committerBrian Pane <brianp@apache.org>
Mon, 18 Mar 2002 01:43:17 +0000 (01:43 +0000)
PR: 9187
Submitted by: Ryan Cruse <ryan@estara.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93988 13f79535-47bb-0310-9956-ffa450edef68

server/vhost.c

index e7b34c62c3f65934ffe7ab66276d703f2bf9a499..07ea8c4f5e7a908a697ea852a947044655258311 100644 (file)
@@ -773,9 +773,9 @@ static void fix_hostname(request_rec *r)
     if (r->hostname[0] != '[') {
         for (dst = host; *dst; dst++) {
             if (*dst == '.') {
-                dst++;
-                if (*dst == '.')
+                if (*(dst + 1) == '.') {
                     goto bad;
+                }
             }
             else if (*dst == '/' || *dst == '\\') {
                 goto bad;