cpython: 10d04bdb05ab (original) (raw)
Mercurial > cpython
changeset 80779:10d04bdb05ab 3.3
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:46 +0100 |
parents | 3b67247f0bbb(current diff)d8300842a0e9(diff) |
children | a4fc52da295b 3571a2808445 |
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 @@ -1756,7 +1756,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 @@ -108,6 +108,9 @@ Core and Builtins Library ------- +- Issue #16248: Disable code execution from the user's home directory by