Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Jun 2004 16:57:24 +0300
From:      Ville =?ISO-8859-1?Q?Skytt=E4?= <scop@FreeBSD.org>
To:        freebsd-cvsweb@FreeBSD.org
Subject:   Re: cvsweb version 3:3.0.1-1 diff problems (and howto debug this)
Message-ID:  <1086357443.30172.290.camel@bobcat.mine.nu>
In-Reply-To: <20040604095002.GA28772@vgelder.com>
References:  <20040602171019.GA12732@vgelder.com> <20040604095002.GA28772@vgelder.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1086357443.30172.290.camel>