[Zope-CMF] Virus check

Arjan Huizer a.huizer@kennisnet.org
Tue, 17 Jun 2003 10:08:00 +0200


The full traceback is:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Exception traceback
Time 2003/06/17 09:53:43.765 GMT+2=20
User Name (User Id) root (root)=20
Request URL http://localhost/junk/test_file/file_edit=20
Exception Type AttributeError=20
Exception Value validate_file=20

Traceback (innermost last):=20

Module ZPublisher.Publish, line 98, in publish=20
Module ZPublisher.mapply, line 88, in mapply=20
Module ZPublisher.Publish, line 39, in call_object=20
Module Shared.DC.Scripts.Bindings, line 252, in __call__=20
Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec=20
Module Products.PythonScripts.PythonScript, line 315, in _exec=20
Module Script (Python), line 1, in file_edit
<PythonScript at /junk/file_edit used for /junk/test_file>
Line 1=20
AttributeError: validate_file=20

Display traceback as text

REQUEST
form
choice ' Change '=20
file <ZPublisher.HTTPRequest.FileUpload instance at 0194640C>=20

cookies
__ac_name 'root'=20
dtpref_cols '95%'=20
dtpref_rows '20'=20

lazy items
SESSION <bound method SessionDataManager.getSessionData of =
<SessionDataManager instance at 0191CB80>>=20

other
AUTHENTICATION_PATH ''=20
file <ZPublisher.HTTPRequest.FileUpload instance at 0194640C>=20
traverse_subpath []=20
choice ' Change '=20
SERVER_URL 'http://localhost'=20
PUBLISHED <PythonScript at /junk/file_edit used for /junk/test_file>=20
URL 'http://localhost/junk/test_file/file_edit'=20
AUTHENTICATED_USER root=20
TraversalRequestNameStack []=20
URL0 http://localhost/junk/test_file/file_edit=20
URL1 http://localhost/junk/test_file=20
URL2 http://localhost/junk=20
URL3 http://localhost=20
BASE0 http://localhost=20
BASE1 http://localhost=20
BASE2 http://localhost/junk=20
BASE3 http://localhost/junk/test_file=20
BASE4 http://localhost/junk/test_file/file_edit=20

environ
HTTP_ACCEPT_ENCODING 'gzip, deflate'=20
CONTENT_TYPE 'multipart/form-data; =
boundary=3D---------------------------7d32902b30116'=20
PATH_TRANSLATED '\\junk\\test_file\\file_edit'=20
HTTP_ACCEPT 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, =
application/vnd.ms-powerpoint, application/vnd.ms-excel, =
application/msword, */*'=20
HTTP_COOKIE '__ac_name=3D"root"; dtpref_rows=3D"20"; =
dtpref_cols=3D"95%"; __ac=3D"cm9vdDpyb290%0A"'=20
HTTP_ACCEPT_LANGUAGE 'nl'=20
GATEWAY_INTERFACE 'CGI/1.1'=20
SERVER_PORT '80'=20
HTTP_USER_AGENT 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)'=20
CONTENT_LENGTH '295'=20
REMOTE_ADDR '127.0.0.1'=20
channel.creation_time 1055836419=20
SERVER_PROTOCOL 'HTTP/1.1'=20
PATH_INFO '/junk/test_file/file_edit'=20
HTTP_HOST 'localhost'=20
REQUEST_METHOD 'POST'=20
SCRIPT_NAME ''=20
SERVER_SOFTWARE 'Zope/(Zope 2.6.1 (binary release, python 2.1, =
win32-x86), python 2.1.3, win32) ZServer/1.1b1'=20
HTTP_CACHE_CONTROL 'no-cache'=20
CONNECTION_TYPE 'Keep-Alive'=20
HTTP_REFERER 'http://localhost/junk/test_file/file_edit_form'=20
SERVER_NAME 'kenwks-01.kennisnet.org'=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Does anyone happen to know if I can create a file on the server (in the =
skins directory) that represents an external method or does this have to =
be created through thye ZMI?

Thanks for your help so far!

Arjan

-----Oorspronkelijk bericht-----
Van: Chris Withers [mailto:chrisw@nipltd.com]
Verzonden: dinsdag 17 juni 2003 9:26
Aan: Arjan Huizer
CC: zope-cmf@zope.org
Onderwerp: Re: [Zope-CMF] Virus check


Arjan Huizer wrote:

> Hi,
>=20
> I am running Zope 2.6.1 together with CMF 1.3 on a linux box. I would =
like to run a virus check on all uploaded files in the CMF. I have =
installed FProt on my Linux server.=20
>=20
> When I upload a file I get the following error:
>=20
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> Error Type: AttributeError=20
> Error Value: validate_file=20
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D

What's the full traceback?

> Note that when I customize the validate_file script, everything does =
work.=20

Does it show up in any ZMI directory views before you customise it?

BTW, you plan is flawed. You won't be able to call you virus checker =
from inside=20
a skin method.

Look at writing an External Method instead...

cheers,

Chris


-----Oorspronkelijk bericht-----
Van: Chris Withers [mailto:chrisw@nipltd.com]
Verzonden: dinsdag 17 juni 2003 9:26
Aan: Arjan Huizer
CC: zope-cmf@zope.org
Onderwerp: Re: [Zope-CMF] Virus check


Arjan Huizer wrote:

> Hi,
>=20
> I am running Zope 2.6.1 together with CMF 1.3 on a linux box. I would =
like to run a virus check on all uploaded files in the CMF. I have =
installed FProt on my Linux server.=20
>=20
> When I upload a file I get the following error:
>=20
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> Error Type: AttributeError=20
> Error Value: validate_file=20
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D

What's the full traceback?

> Note that when I customize the validate_file script, everything does =
work.=20

Does it show up in any ZMI directory views before you customise it?

BTW, you plan is flawed. You won't be able to call you virus checker =
from inside=20
a skin method.

Look at writing an External Method instead...

cheers,

Chris