You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Ryan Cruse <ry...@estara.com> on 2001/12/19 02:18:57 UTC

general/9187: fix_hostname in vhost.c doesn't handle DNS names that end with '.'

>Number:         9187
>Category:       general
>Synopsis:       fix_hostname in vhost.c doesn't handle DNS names that end with '.'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Dec 18 17:20:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     ryan@estara.com
>Release:        2.0.28
>Organization:
apache
>Environment:
Redhat 7.2 Linux apache.estara.com. 2.4.7-10smp #1 SMP Thu Sep 6 17:09:31 EDT 2001 i686 unknown
>Description:
dst is incremented skipping the null at the end of the hostname and keep going til it fails on a .. or / or hits a null not preceeded by a '.'. 

Fix included.
>How-To-Repeat:
GET / HTTP/1.1
host: my.host.com.

>Fix:
[root@apache server]# diff vhost.c vhost.c.orig
773c773,774
<                 if (*(dst+1) == '.')
---
>                 dst++;
>                 if (*dst == '.')
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]