[Zope-dev] Inhibit URL-traversal

Dieter Maurer dieter at handshake.de
Tue Feb 28 13:38:01 EST 2006


Dario Lopez-Kästen wrote at 2006-2-13 08:06 +0100:
> ...
>> It can -- with some difficulties:
>> 
>>   Templates and scripts are called because they define
>>   "index_html" as "None".
>> 
>>   If you give a template or script a non-None "index_html",
>>   then this object will be called instead of the template/script.
>> 
>
>I see. Is this possible to do on FS-based scripts/templates?

It is, but you have to work a bit:

  You derive your own classes from the original ones and provide
  an appropriate "index_html" definition.

  You register your classes to handle the appropriate extensions.

  Note, that the last registration wins over previous ones.
  You might need to force an import of the module/s performing
  the other registration/s in your module to ensure that your
  registration is indeed the last one.

-- 
Dieter


More information about the Zope-Dev mailing list