Commit 944e4050 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki
parent 4ede85da
...@@ -964,14 +964,16 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -964,14 +964,16 @@ class ZCatalog(Folder, Persistent, Implicit):
return obj_list return obj_list
def getMetadataForUid(self, rid, sql_catalog_id=None): def getMetadataForUid(self, rid, sql_catalog_id=None):
"""return the correct metadata for the cataloged uid""" # !!! do not use docstring here (CVE-2011-0720).
# return the correct metadata for the cataloged uid
catalog = self.getSQLCatalog(sql_catalog_id) catalog = self.getSQLCatalog(sql_catalog_id)
if catalog is not None: if catalog is not None:
return catalog.getMetadataForUid(int(rid)) return catalog.getMetadataForUid(int(rid))
return {} return {}
def getIndexDataForUid(self, rid, sql_catalog_id=None): def getIndexDataForUid(self, rid, sql_catalog_id=None):
"""return the current index contents for the specific uid""" # !!! do not use docstring here (CVE-2011-0720).
# return the current index contents for the specific uid
catalog = self.getSQLCatalog(sql_catalog_id) catalog = self.getSQLCatalog(sql_catalog_id)
if catalog is not None: if catalog is not None:
return catalog.getIndexDataForUid(rid) return catalog.getIndexDataForUid(rid)
...@@ -1218,12 +1220,11 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -1218,12 +1220,11 @@ class ZCatalog(Folder, Persistent, Implicit):
pass pass
def resolve_path(self, path): def resolve_path(self, path):
""" # !!! do not use docstring here (CVE-2011-0720).
Attempt to resolve a url into an object in the Zope # Attempt to resolve a url into an object in the Zope
namespace. The url may be absolute or a catalog path # namespace. The url may be absolute or a catalog path
style url. If no object is found, None is returned. # style url. If no object is found, None is returned.
No exceptions are raised. # No exceptions are raised.
"""
try: try:
return self.unrestrictedTraverse(path) return self.unrestrictedTraverse(path)
except ConflictError: except ConflictError:
......
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