cvsweb version 3:3.0.1-1 diff problems (and howto debug this)

VilleSkyttä scop at FreeBSD.org
Fri Jun 4 13:57:30 GMT 2004


On Fri, 2004-06-04 at 12:50, Koos Vriezen wrote:

> Ok, turned out to be the query string was not parsed right. The string
> r1=1.1;r2=1.2 was changed to r1%3D1.1%3Br2%3D1.2 at line 387:
> 
> my %query = ();
> if (defined($ENV{QUERY_STRING})) {
>   $ENV{QUERY_STRING} = uri_escape($ENV{QUERY_STRING});
>   for my $p (split(/[;&]+/, $ENV{QUERY_STRING})) {
[...]
> commenting out the 'uri_escape' line makes cvsweb work again.
> Up to you and/or debian maintainer to fix this, or is it my perl?

That uri_escape() line does not exist in vanilla FreeBSD-CVSweb, so I
guess it's a Debian addition and should be fixed there.

It looks fundamentally broken to me; the only thing I can suggest is to
remove it (instead of eg. trying to tweak the split() regexp below it to
cope with the twice [1] escaped query string).

[1] The QUERY_STRING environment variable should alredy be in URI 
    encoded form.  If it isn't, many things will most certainly break,
    and blindly re-encoding the whole of it before parsing the key=value
    pairs will not produce meaningful results.
    http://hoohoo.ncsa.uiuc.edu/cgi/env.html



More information about the freebsd-cvsweb mailing list