Skip to content

Deny eval() direct access to builtins#20713

Merged
rhettinger merged 1 commit intopython:masterfrom
rhettinger:namedtuple_safer_namespace
Jun 8, 2020
Merged

Deny eval() direct access to builtins#20713
rhettinger merged 1 commit intopython:masterfrom
rhettinger:namedtuple_safer_namespace

Conversation

@rhettinger
Copy link
Copy Markdown
Contributor

The creation of __new__() doesn't require access to builtins. So removing that capability makes eval() slightly safer.

@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link
Copy Markdown

GH-20714 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 8, 2020
(cherry picked from commit 3ff51d4)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants