www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@decus.org (Rodent of Unusual Size)
Subject Re: general/805: multiple slashes before a ~user path are incorrectly handled
Date Tue, 01 Jul 1997 14:20:01 GMT
The following reply was made to PR general/805; it has been noted by GNATS.

From: coar@decus.org (Rodent of Unusual Size)
To: APbugs@apache.org, Coar@decus.org
Subject: Re: general/805: multiple slashes before a ~user path are incorrectly
 handled
Date: Tue, 01 Jul 1997 10:17:28 -0400

 
 [copy of mail from user -ken]
 
 Date: Tue, 01 Jul 1997 07:04:26 -0400 (EDT)
 From: Nick Allen <nallen@thor.tjhsst.edu>
 
 I verified that it is only when "name" is an actual user ID and
 traced the problem to mod_userdir.  The error is where translate_userdir
 checks to see if there is any work to be done.  Currently we have:
 
     char *name = r->uri;
     const char *w, *dname, *redirect;
     char *x = NULL;
 
     if (userdirs == NULL || !strcasecmp(userdirs, "disabled") ||
         (name[0] != '/') || (name[1] != '~')) {
       return DECLINED;
     }
 
 which explicitly assumes that the first character is a '/' and the
 second is a '~'.  The simplest way to fix this would be to add
 
    no2slash (name);
 
 before the if to get rid of the multiple slashes.  I built a copy of
 httpd with this change and it seemed to handle the //~user references
 correctly.
 
 -- Nick Allen
 nallen@acm.org
 nallen@vt.edu
 nallen@tjhsst.edu

Mime
View raw message