[XML-SIG] Using PyExpat.py

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 20 Feb 2001 00:53:44 +0100

> is the code Guido quoted taken from a utility function (e.g. a standard
> input handler), or is it part of the core library:
>         if os.path.isfile(sysid):
>             basehead = os.path.split(os.path.normpath(base))[0]
>             source.setSystemId(os.path.join(basehead, sysid))
>             f = open(sysid, "rb")
>         else:
>             source.setSystemId(urlparse.urljoin(base, sysid))
>             f = urllib.urlopen(source.getSystemId())
> if the latter, I hope you realize that this can be abused in all sorts of
> interesting ways...

That is part of xml.sax.saxlib.prepare_input_source. I don't realize
all the sorts in which this can be abused, though - can you elaborate some?