1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-12 20:30:57 +00:00

Don't pollute WSGI environ with OS environ

This commit is contained in:
Unrud 2018-08-16 07:59:59 +02:00
parent e5e13faa7c
commit 6f15cddfbc
3 changed files with 2 additions and 12 deletions

View file

@ -206,6 +206,8 @@ class ThreadedHTTPSServer(socketserver.ThreadingMixIn, HTTPSServer):
class ServerHandler(wsgiref.simple_server.ServerHandler):
# Don't pollute WSGI environ with OS environment
os_environ = {}
def log_exception(self, exc_info):
logger.error("An exception occurred during request: %s",
@ -269,11 +271,6 @@ class Application:
"""Sanitize headers for logging."""
request_environ = dict(environ)
# Remove environment variables
if not self.configuration.getboolean("logging", "full_environment"):
for shell_variable in os.environ:
request_environ.pop(shell_variable, None)
# Mask passwords
mask_passwords = self.configuration.getboolean(
"logging", "mask_passwords")