Commit f351cb41 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Alain Takoudjou

Disallow selecting by uid.

uid is used internally during recursive calls and using uid can lead to
traverse all lines of catalog.
parent 88ee5193
......@@ -1081,6 +1081,9 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
security.declarePublic('searchAndActivate')
def searchAndActivate(self, *args, **kw):
"""Restricted version of _searchAndActivate"""
if 'uid' in kw:
raise TypeError("'uid' cannot be used to select documents as it is "
"used internally")
return self._searchAndActivate(restricted=True, *args, **kw)
security.declareProtected(Permissions.ManagePortal, 'upgradeSchema')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment