[zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.27
Chris McDonough
chrism at zope.com
Wed Aug 6 11:02:25 EDT 2003
Update of /cvs-zopeorg/Products/ZopeOrg-NV
In directory cvs.zope.org:/tmp/cvs-serv21227
Modified Files:
__init__.py
Log Message:
Dont allow ttw call of portal_catalog.
=== Products/ZopeOrg-NV/__init__.py 1.26 => 1.27 ===
def searchResults(self, REQUEST=None, **kw):
''
if (len(kw) == 0) and (REQUEST is not None):
- url = REQUEST['URL']
- if url.endswith('portal_catalog') or \
+ url = REQUEST.get('URL', None)
+ if url and (url.endswith('portal_catalog') or \
url.endswith('portal_catalog/') or \
- url.endswith('portal_catalog/index_html'):
- raise ValueError, 'catalog not callable from the web'
+ url.endswith('portal_catalog/index_html')):
+ log('TTW call of portal_catalog. Referer: %s' %
+ REQUEST.get('HTTP_REFERER', '<unknown>')
+ raise ValueError, 'catalog not callable from the web'
return apply(_searchResults, (self, REQUEST), kw)
More information about the zopeorg-checkins
mailing list