Commit 5789a8fc authored by Alec Mitchell's avatar Alec Mitchell

We have multiple versions of restrictedTraverse which need to be patched, sadly.

parent d2101e5b
......@@ -294,7 +294,19 @@ def restrictedTraverse(object, path, securityManager,
container = o.im_self
elif (has(aq_base(object), name) and get(object, name) == o):
container = object
if not validate(object, container, name, o):
try:
validated = validate(object, container, name, o)
except Unauthorized:
# If next is a simple unwrapped property, it's
# parentage is indeterminate, but it may have been
# acquired safely. In this case validate will
# raise an error, and we can explicitly check that
# our value was acquired safely.
validated = 0
if container is None and \
guarded_getattr(object, name, M) is o:
validated = 1
if not validated:
raise Unauthorized, name
else:
# Try an attribute.
......
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