You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Raymond S Brand <rs...@rsbx.net> on 1999/05/01 00:07:26 UTC

[PATCH] for a bug in mod_dir

The mod_dir request handler does not gracefully handle the situation
where the value of the DirectoryIndex directive is `.' (a single dot)
for a directory request. This bug can likely also be triggered for
other values of the DirectoryIndex directive that map back to the same
directory, possibly through other directories.

The included patch changes the mod_dir request handler to only consider
regular files when searching for a potential index file.

No applicable PR#s were found.

Raymond S Brand

Re: [PATCH] for a bug in mod_dir

Posted by Raymond S Brand <rs...@rsbx.net>.
Salvador Ortiz Garcia wrote:
> 

> 
> As documented, DirectoryIndex can take any URI so
> 
> Why we can't use
> 
>           ... == HTTP_OK && !S_ISDIR(rr->finfo.st_mode)
> 
> to allow Pure Virtal URIs(tm)?

Your suggested change lets through non-existant files and
symlinks. A symlink pointing at the directory (possibly
chained) would result in the original behavior, where the
child process gets into an infinite recursion.

Raymond S Brand

Re: [PATCH] for a bug in mod_dir

Posted by Salvador Ortiz Garcia <so...@msg.com.mx>.
[ Sorry if duplicated, but I think that my previous post was missed ]


On Fri, 30 Apr 1999, Raymond S Brand wrote:

> The mod_dir request handler does not gracefully handle the situation
> where the value of the DirectoryIndex directive is `.' (a single dot)
> for a directory request. This bug can likely also be triggered for
> other values of the DirectoryIndex directive that map back to the same
> directory, possibly through other directories.
> 
> The included patch changes the mod_dir request handler to only consider
> regular files when searching for a potential index file.

As documented, DirectoryIndex can take any URI so

Why we can't use
             
          ... == HTTP_OK && !S_ISDIR(rr->finfo.st_mode)

to allow Pure Virtal URIs(tm)?

Regards

Salvador Ortiz