[Zope] Re: File uploads: filename with ';'

Tino Wildenhain tino at wildenhain.de
Wed Oct 27 02:50:27 EDT 2004


Hi,

Am Mi, den 27.10.2004 schrieb Vova um 0:45:
> Tino Wildenhain wrote:
> > Hi,
> > 
> > Am Di, den 26.10.2004 schrieb Vova um 20:10:
> >> Hello All!
> >> It seems that Zope does not handle names of uploaded files correctly when
> >> it include ';'.
> > 
> > What ever "correctly" means ;)
> > Surprice: Zope does not care about names of uploaded files
> > (In the Request)
> Simple script:
> 
> return context.REQUEST.file.filename
> 
> Now let's create the form for it and upload file "a;b".
> This script will return '"a' what is obviously not correct.
> Filename is used, for example, as ID for newly created File object.
> A lot of more realistic examples can be found in Plone.

whatever Zope gives you as "filename" here comes from 
the browser. So either the browser strips your filename
with ; in it (see with tcpflow or shanes tcpwatch)
or the browser doesnt do the quoting right.

> > However if you create File objects via DAV or
> > FTP directly in a Folder, Zope uses the name
> > information to guess best to get an id for the
> > object. It tries hard to not end up having an
> > illegal id here.
> I've not tried FTP. May be it's worth trying.

Maybe it makes a difference in the filename handling
of your client. For Zope it makes not much of a difference.

Regards
Tino



More information about the Zope mailing list