cpython: d8300842a0e9 (original) (raw)
Mercurial > cpython
changeset 80778:d8300842a0e9 3.2
Issue #16248: Disable code execution from the user's home directory by tkinter when the -E flag is passed to Python. Patch by Zachary Ware. [#16248]
Antoine Pitrou solipsis@pitrou.net | |
---|---|
date | Sun, 09 Dec 2012 14:46:18 +0100 |
parents | ffb64a074b66 |
children | 10d04bdb05ab 1ff72360ceb6 |
files | Lib/tkinter/__init__.py Misc/NEWS |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-)[+] [-] Lib/tkinter/__init__.py 4 Misc/NEWS 3 |
line wrap: on
line diff
--- a/Lib/tkinter/init.py +++ b/Lib/tkinter/init.py @@ -1698,7 +1698,9 @@ class Tk(Misc, Wm): self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) if useTk: self._loadtk()
self.readprofile(baseName, className)[](#l1.7)
if not sys.flags.ignore_environment:[](#l1.8)
# Issue #16248: Honor the -E flag to avoid code injection.[](#l1.9)
def loadtk(self): if not self._tkloaded: self.tk.loadtk()self.readprofile(baseName, className)[](#l1.10)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -179,6 +179,9 @@ Core and Builtins Library ------- +- Issue #16248: Disable code execution from the user's home directory by