r13795 - in Products.Archetypes/trunk: . Products/Archetypes/skins/archetypes
"Maurits van Rees" <[email protected]> Fri, 09 Sep 2011 09:30:43 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: maurits Date: Fri Sep 9 09:30:42 2011 New Revision: 13795 Modified: Products.Archetypes/trunk/CHANGES.txt Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/at_download.py Log: Raise a NotFound exception when the at_download script cannot find the requested field. I have seen the Google bot trying to index at_download/[email protected] and at_download/www.example.org, which is obviously wrong. Modified: Products.Archetypes/trunk/CHANGES.txt ============================================================================== --- Products.Archetypes/trunk/CHANGES.txt (original) +++ Products.Archetypes/trunk/CHANGES.txt Fri Sep 9 09:30:42 2011 @@ -4,7 +4,11 @@ 1.7.8 (unreleased) ------------------ -- Nothing changed yet. +- Raise a NotFound exception when the at_download script cannot + find the requested field. I have seen the Google bot trying to + index at_download/[email protected] and at_download/www.example.org, + which is obviously wrong. + [maurits] 1.7.7 (2011-08-23) Modified: Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/at_download.py ============================================================================== --- Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/at_download.py (original) +++ Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/at_download.py Fri Sep 9 09:30:42 2011 @@ -10,4 +10,7 @@ field = context.getWrappedField(traverse_subpath[0]) else: field = context.getPrimaryField() +if not hasattr(field, 'download'): + from zExceptions import NotFound + raise NotFound return field.download(context) ------------------------------------------------------------------------------ Why Cloud-Based Security and Archiving Make Sense Osterman Research conducted this study that outlines how and why cloud computing security and archiving is rapidly being adopted across the IT space for its ease of implementation, lower cost, and increased reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/