Skip to content

Commit

Permalink
- Forward-port fix for vulnerability addressed in Hotfix_20050405 fr…
Browse files Browse the repository at this point in the history
…om 2.7 branch.
  • Loading branch information
tseaver committed Apr 5, 2005
1 parent 91b7f0b commit 63009a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions RestrictionMutator.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def checkName(self, node, name):
# Note: "_" *is* allowed.
self.error(node, '"%s" is an invalid variable name because'
' it starts with "_"' % name)
if name.endswith('__roles__'):
self.error(node, '"%s" is an invalid variable name because '
'it ends with "__roles__".' % name)
if name == "printed":
self.error(node, '"printed" is a reserved name.')

Expand All @@ -109,6 +112,9 @@ def checkAttrName(self, node):
# Note: "_" *is* allowed.
self.error(node, '"%s" is an invalid attribute name '
'because it starts with "_".' % name)
if name.endswith('__roles__'):
self.error(node, '"%s" is an invalid attribute name '
'because it ends with "__roles__".' % name)

def prepBody(self, body):
"""Insert code for print at the beginning of the code suite."""
Expand Down

0 comments on commit 63009a2

Please sign in to comment.