pycs-devel archive weblog

A blog for archiving the pycs-devel mailing list

2003-3-5

Georg Bauer: [PyCS-devel] New in CVS: bugfixes in searches.py, referers.py and zeitgeist.py

Hi!

Stumbled over several small bugs in the named modules, mostly wrong
quoting/unquoting stuff. Should now work better. And changed several of
the regexps to better recognize search urls where the searchterm isn't the
first parameter (couldn't show up before, as the medusa bug prevented
parameters after the first parameter to show up :-) ).

bye, Georg

Georg Bauer: [PyCS-devel] PyDS patch needed for patched PyCS

Hi!

Actually the medusa bug in PyCS wiped out a bug in PyDS. Now that PyCS
works right, PyDS stumbles :-)

This is quite weird, two bugs working together to create an actual working
experience. I happened to hear about that before, but never seen it life
myself. Wew.

Ok, so you need to do a small patch to PyDS/MacrosTool.py in order to get
PyDS working again nicely with the count.py counter - without the patch,
you will not have any more referers in your referers list. So it's not
that big a problem, but annoying it is.

Just edit the PyDS/MacrosTool.py and change the lines with the %%26 in
them (two assignements to html) to use & instead of the %%26.

This will be fixed in the 0.4.15 I am currently working on and am
releasing hopefully today.

bye, Georg

Georg Bauer: Re: [PyCS-devel] bug in medusa that creates problems for both pycs and pyds (functionality bug, not security bug!)

Hi!

> ... so will forward it on to them. Unless you get there first ;-)

Since I am now at work and only have limited access to home email, you can
send in the patch :-)

bye, Georg

Georg Bauer: Re: [PyCS-devel] bug in medusa that creates problems for both pycs and pyds (functionality bug, not security bug!)

Hi!

> Shall we forward this to AMK?

I just subscribed to the -dev list and will send the patch in, as soon as
I am subscribed.

bye, Georg

Phillip Pearson: Re: [PyCS-devel] bug in medusa that creates problems for both pycs and pyds (functionality bug, not security bug!)

On Tue, Mar 04, 2003 at 11:59:06AM +0100, Georg Bauer wrote:
> > path, qs = urllib.splitquery(request)
> > if '%' in path:
> > request = unquote(path) + qs
>
> Ok, I tried a bit, this is what looks like to work (and is currently used
> on muensterland.org to test it):
>
> in the top of http_server.py:
>
> from urlllib import unquote, splitquery
>
> in the found_terminator method:
>
> rpath, rquery = splitquery(request)
> if '%' in rpath:
> if rquery:
> request = unquote(rpath)+'?'+rquery
> else:
> request = unquote(rpath)
>
> Did I miss some problem? Or should this really work?

Looks like it should work to me... just joined the medusa-dev mailing
list:

http://mail.python.org/mailman/listinfo/medusa-dev

... so will forward it on to them. Unless you get there first ;-)

Cheers,
Phil

Georg Bauer: Re: [PyCS-devel] bug in medusa that creates problems for both pycs and pyds (functionality bug, not security bug!)

Hi!

> path, qs = urllib.splitquery(request)
> if '%' in path:
> request = unquote(path) + qs

Ok, I tried a bit, this is what looks like to work (and is currently used
on muensterland.org to test it):

in the top of http_server.py:

from urlllib import unquote, splitquery

in the found_terminator method:

rpath, rquery = splitquery(request)
if '%' in rpath:
if rquery:
request = unquote(rpath)+'?'+rquery
else:
request = unquote(rpath)

Did I miss some problem? Or should this really work?

bye, Georg

Phillip Pearson: Re: [PyCS-devel] bug in medusa that creates problems for both pycs and pyds (functionality bug, not security bug!)

> > IMHO this should become:
> >
> > if '%' in uri:
> > path, qs = urllib.splitquery(uri)
> > url = unquote(path) + qs
>
> Hmm. It's in line 469ff - there is actually "request" in the code, nur
> "uri" - are you using an older/newer version than 0.5.3?

I'm running the latest CVS version:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/oedipus/medusa/http_server.py?rev=1.10&content-type=text/vnd.viewcvs-markup

Looks like request is 'GET /foo/bar/... HTTP/1.1' and uri is just the
URI part of that. The latest change (2 months old) was to move the
unquoting down a bit in the code so it only unquoted uri, not request,
fixing part of the problem (URLs with spaces ended up decoding totally
wrongly) but not all of it (thus our difficulty now).

> path, qs = urllib.splitquery(request)
> if '%' in path:
> request = unquote(path) + qs
>
> So we don't unquote if there is only quoting in the query? This should fix
> the problem, I think. If Id idn't overlook some problem, that is ...

Yeah. Not that it makes much of a difference; if s doesn't have any
'%'s, unquote(s) should IMHO equal s anyway ...

Shall we forward this to AMK?

Cheers,
Phil :)