Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several checks for __builtins__ and builtins. #134

Merged
merged 3 commits into from Oct 2, 2018
Merged

Several checks for __builtins__ and builtins. #134

merged 3 commits into from Oct 2, 2018

Conversation

loechel
Copy link
Member

@loechel loechel commented Oct 2, 2018

builtins is a dangerous element in RestrictedPython, as it contains the whole Programming Environment with all modules and control access to them.
Should be forbidden to access.

Fixes #115

builtins are a dangourse element in RestrictedPython, as they contain the whole Programming Environment with all modules and conroll access to them.
Should be forbidden to access.
@loechel loechel requested a review from icemac October 2, 2018 13:46
Copy link
Member

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM.

)
@pytest.mark.parametrize(*c_exec)
def test_import_py2_as_builtins(c_exec):
"""It should not be allowed to access global builtins in Python3."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in Python 2

)
@pytest.mark.parametrize(*c_exec)
def test_import_py2_builtins(c_exec):
"""It should not be allowed to access global builtins in Python3."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in Python 2

@icemac icemac added the bug label Oct 2, 2018
@icemac icemac added this to To do in RestrictedPython 4.0 via automation Oct 2, 2018
@icemac icemac added this to In progress in Zope 4 final release via automation Oct 2, 2018
@icemac icemac moved this from To do to In progress in RestrictedPython 4.0 Oct 2, 2018
@icemac icemac moved this from In progress to Reviewer approved in Zope 4 final release Oct 2, 2018
@loechel loechel merged commit 42b4be0 into master Oct 2, 2018
RestrictedPython 4.0 automation moved this from In progress to Done Oct 2, 2018
Zope 4 final release automation moved this from Reviewer approved to Done Oct 2, 2018
@loechel loechel deleted the builtins branch October 2, 2018 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants