You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Leif W <wa...@usa.net> on 2003/11/02 00:05:20 UTC

Re: [users@httpd] mod_autoindex and filenames containing "%"

Here's an update I just recevied from bugzilla.

Leif

directory listing bug with % symbol in directory or file names

nd@perlig.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From nd@perlig.de  2003-11-01 22:33 -------
Fixed in 2.1 and proposed for backport into the 2.0 stable branch.

Thanks for your report and thanks for using Apache!


----- Original Message ----- 
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Wednesday, October 29, 2003 1:53 AM
Subject: Re: [users@httpd] mod_autoindex and filenames containing "%"


> Leslie R. Lait wrote:
> > I'm having problems using mod_autoindex to provide directory listings
> > of collections of data files that follow a certain local file naming
> > convention.
>
> I have been able to fix this behaviour. See the bug report that Leif
> found/updated:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13598
>
> I've been too busy to find time to figure out how to propose it to be
fixed,
> and sadly will continue to be so.
>
> If you are in need of having mod_autoindex work the way you want, a quick
> fix is to change a line in the source and recompile. I cannot make a patch
> now, so locate this function:
>
> // in server/request.c (around line 1664)
> AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(...)
> {
>     ...
>     if (r->path_info && *r->path_info) {
>         ...
>     }
>     else {
>         udir = ap_make_dirstr_parent(rnew->pool, r->uri);
>         rnew->uri = ap_make_full_path(rnew->pool, udir, dirent->name);
>     }
>     ...
> }
>
> The last statement (rnew->uri ...) should be changed to:
>         rnew->uri = ap_make_full_path(rnew->pool, udir,
>             ap_escape_path_segment(rnew->pool, dirent->name));
>
> This will escape the URI passed to ap_process_request_internal(), which
then
> will behave as expected.
>
> Regards,
> Robert Andersson
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org