From: Barry Warsaw Date: Mon, 1 Mar 2010 21:34:34 +0000 (+0000) Subject: Apply the change suggested by PJE for issue 7250. Unfortunately, we couldn't X-Git-Tag: v2.6.5rc1~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6706296a28f314a21af37441f643704dee9ce8b;p=python Apply the change suggested by PJE for issue 7250. Unfortunately, we couldn't come up with a unit test. :( --- diff --git a/Lib/wsgiref/handlers.py b/Lib/wsgiref/handlers.py index 173e34c136..5cfc28af6f 100644 --- a/Lib/wsgiref/handlers.py +++ b/Lib/wsgiref/handlers.py @@ -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__( diff --git a/Misc/NEWS b/Misc/NEWS index a918937180..a7b724fb02 100644 --- 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