-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow try..except..finally in the new transformer.py
Not allowing it would be a big regression, since the old RCompile allowed it also.
- Loading branch information
1 parent
746045b
commit 33a3e2a
Showing
2 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33a3e2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephan-hof Could you write a test which assures that the
__traceback__
attribute of an exception on Python 3 is not accessible: See this post on StackOverflow which explains what I mean. Access to the traceback is a big attack vector.33a3e2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I could do that, but don't you think it is a duplication of the test 'test_transformer__RestrictingNodeTransformer__visit_Attribute__1' ?
33a3e2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it is duplicate but I want to be super safe here that it is not possible to access the traceback in the exception due to the security problems.
33a3e2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a test here: 4e90e02