]> granicus.if.org Git - python/commitdiff
Apply the change suggested by PJE for issue 7250. Unfortunately, we couldn't
authorBarry Warsaw <barry@python.org>
Mon, 1 Mar 2010 21:34:34 +0000 (21:34 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 1 Mar 2010 21:34:34 +0000 (21:34 +0000)
come up with a unit test. :(

Lib/wsgiref/handlers.py
Misc/NEWS

index 173e34c136e89c9c148bd8270d41dc339a616e9b..5cfc28af6f9660b16efe8f076a2b1cad4be26a70 100644 (file)
@@ -468,6 +468,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 a9189371809d19394655f9595f6889568a5857ae..a7b724fb0230e272968d8b5e9aa00ce67caf6f74 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -74,6 +74,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