Commit 314383c4 authored by Jeremy Hylton's avatar Jeremy Hylton

Raise a bare Unauthorized if we fail this early.

name is unbound at this point.
parent 637ba565
...@@ -17,7 +17,7 @@ Page Template-specific implementation of TALES, with handlers ...@@ -17,7 +17,7 @@ Page Template-specific implementation of TALES, with handlers
for Python expressions, string literals, and paths. for Python expressions, string literals, and paths.
""" """
__version__='$Revision: 1.40 $'[11:-2] __version__='$Revision: 1.41 $'[11:-2]
import re, sys import re, sys
from TALES import Engine, CompilerError, _valid_name, NAME_RE, \ from TALES import Engine, CompilerError, _valid_name, NAME_RE, \
...@@ -295,7 +295,7 @@ def restrictedTraverse(object, path, securityManager, ...@@ -295,7 +295,7 @@ def restrictedTraverse(object, path, securityManager,
# If the path starts with an empty string, go to the root first. # If the path starts with an empty string, go to the root first.
object = object.getPhysicalRoot() object = object.getPhysicalRoot()
if not securityManager.validateValue(object): if not securityManager.validateValue(object):
raise Unauthorized, name raise Unauthorized
path.pop(0) path.pop(0)
REQUEST = {'path': path} REQUEST = {'path': path}
......
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