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

Lib/wsgiref/handlers.py
Misc/NEWS

index f0cc39803a7fb9f2a1504c58daf6c77b3f6313a4..a87c32ce8519381acd30a83dc417f16b1c813244 100644 (file)
@@ -431,6 +431,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 0ae3867a5867490baa143988ccebbab96e6aba68..f2c9bc2146a79c9aa625303879db6199c06b4f4b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -262,6 +262,9 @@ C-API
 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