]> granicus.if.org Git - python/commitdiff
Manually copy patch for bug 7250 from the release26-maint branch. I suck
authorBarry Warsaw <barry@python.org>
Mon, 1 Mar 2010 21:56:18 +0000 (21:56 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 1 Mar 2010 21:56:18 +0000 (21:56 +0000)
because I did this in the wrong order and couldn't smack svnmerge into
submission.

Lib/wsgiref/handlers.py
Misc/NEWS

index e082823d35d8f788e35309fd18e71cb2a73eeab0..8a78eecf20e4ef88b47e1b8d66b66ffd557f6a24 100644 (file)
@@ -465,6 +465,10 @@ class CGIHandler(BaseCGIHandler):
     """
 
     wsgi_run_once = True
+    # Do not allow os.environ to leak between requests in Google App Engine
+    # and other multi-run CGI use cases.  This is not easily testable.
+    # See http://bugs.python.org/issue7250
+    os_environ = {}
 
     def __init__(self):
         BaseCGIHandler.__init__(
index 55700b726a3a80f52a5894e5f3555c81c695adff..68619ea6911b3ece6692f1bbce3cb4cc1dd58e45 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -94,6 +94,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #7250: Fix info leak of os.environ across multi-run uses of
+  wsgiref.handlers.CGIHandler.
+
 - Issue #1729305: Fix doctest to handle encode error with "backslashreplace".
 
 - Issue #691291: codecs.open() should not convert end of lines on reading and