Date: Thu, 5 Feb 2004 15:05:25 -0500 From: "Gordon Henriksen" <gordon@iclub.com> To: <freebsd-cvsweb@FreeBSD.org> Subject: [PATCH] Minimal support for paths with spaces Message-ID: <016901c3ec23$64e97da0$d454e8c7@domain.ma.iclub.com>
next in thread | raw e-mail | index | archive | help
The attached patch allows me to use cvsweb.cgi to browse folders and view/download files from my CVS repository which contain spaces in their filenames. Contrary to the comment in the source, cvs co -p with a space seems to work just fine: cvsweb.cgi simply wasn't unescaping $ENV{PATH_INFO}, and was as a result telling cvs to access "some+path" or "some%20path" instead of the correct "some path". I carped the y/// and s///e that the program uses to unescape QUERY_STRING and applied them to $pathinfo. I haven't noticed any ill effects whatsoever from this patch, but this is a brand new installation of the CGI (where a prohibition against spaces would be quite the deal-killer). I haven't explored all the cases where ${PATH_INFO} or derivative variables (e.g., $fullname) might be reincorporated into a URL without having been properly re-escaped. e.g., since $pathinfo and $fullpath are now unescaped, filenames with ?'s might now pose a problem if the program tries $r->redirect("$path/$fullpath"). Someone should do that. -- Gordon Henriksen IT Manager ICLUBcentral Inc. gordon@iclub.com P.S. - I'm not subscribed to freebsd-cvsweb@FreeBSD.org, so mail me privately if you expect any messages to reach me.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?016901c3ec23$64e97da0$d454e8c7>