aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-11-17 10:00:16 -0500
committerStefan Monnier2010-11-17 10:00:16 -0500
commitbac2de0fe3fadd8c5642b6a61aa89d245850bed3 (patch)
tree018be5921e26b6703fcff0db4176800dd00757fa
parentc04f2ac06346dcdf6046d3c1612e843da17f3bd2 (diff)
downloademacs-bac2de0fe3fadd8c5642b6a61aa89d245850bed3.tar.gz
emacs-bac2de0fe3fadd8c5642b6a61aa89d245850bed3.zip
* lisp/progmodes/python.el (run-python): Explain why we remove the current
directory from sys.path. Suggested by Eric Hanchrow <erich@cozi.com>.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/progmodes/python.el5
2 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2b137af08d9..85b003d67f6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12010-11-17 Stefan Monnier <monnier@iro.umontreal.ca> 12010-11-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * progmodes/python.el (run-python): Explain why we remove the current
4 directory from sys.path. Suggested by Eric Hanchrow <erich@cozi.com>.
5
3 * progmodes/grep.el (grep-regexp-alist): Tighten the regexp (bug#7378). 6 * progmodes/grep.el (grep-regexp-alist): Tighten the regexp (bug#7378).
4 7
52010-11-16 Stefan Monnier <monnier@iro.umontreal.ca> 82010-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d2bb82e0580..a19445f47f5 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1586,6 +1586,11 @@ buffer for a list of commands.)"
1586 (with-current-buffer 1586 (with-current-buffer
1587 (let* ((cmdlist 1587 (let* ((cmdlist
1588 (append (python-args-to-list cmd) 1588 (append (python-args-to-list cmd)
1589 ;; It's easy for the user to cause the process to be
1590 ;; started without realizing it (e.g. to perform
1591 ;; completion); for this reason loading files from the
1592 ;; current directory is a security risk. See
1593 ;; http://article.gmane.org/gmane.emacs.devel/103569
1589 '("-i" "-c" "import sys; sys.path.remove('')"))) 1594 '("-i" "-c" "import sys; sys.path.remove('')")))
1590 (path (getenv "PYTHONPATH")) 1595 (path (getenv "PYTHONPATH"))
1591 (process-environment ; to import emacs.py 1596 (process-environment ; to import emacs.py