Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _hide_sensitive_fields(self):
if os.environ.get(LOG_SENSITIVE_CONNECTION_DATA, 'false').lower() != 'true':
self.remote_ip = defaults.REDACTED
self.remote_host = defaults.REDACTED
self.remote_port = defaults.REDACTED
self.x_forwarded_for = defaults.REDACTED
if os.environ.get(LOG_REMOTE_USER, 'false').lower() != 'true':
self.remote_user = defaults.REDACTED
if os.environ.get(LOG_REFERER, 'false').lower() != 'true':
self.referer = defaults.REDACTED
def _hide_sensitive_fields(self):
if os.environ.get(LOG_SENSITIVE_CONNECTION_DATA, 'false').lower() != 'true':
self.remote_ip = defaults.REDACTED
self.remote_host = defaults.REDACTED
self.remote_port = defaults.REDACTED
self.x_forwarded_for = defaults.REDACTED
if os.environ.get(LOG_REMOTE_USER, 'false').lower() != 'true':
self.remote_user = defaults.REDACTED
if os.environ.get(LOG_REFERER, 'false').lower() != 'true':
self.referer = defaults.REDACTED
def _hide_sensitive_fields(self):
if os.environ.get(LOG_SENSITIVE_CONNECTION_DATA, 'false').lower() != 'true':
self.remote_ip = defaults.REDACTED
self.remote_host = defaults.REDACTED
self.remote_port = defaults.REDACTED
self.x_forwarded_for = defaults.REDACTED
if os.environ.get(LOG_REMOTE_USER, 'false').lower() != 'true':
self.remote_user = defaults.REDACTED
if os.environ.get(LOG_REFERER, 'false').lower() != 'true':
self.referer = defaults.REDACTED
def _hide_sensitive_fields(self):
if os.environ.get(LOG_SENSITIVE_CONNECTION_DATA, 'false').lower() != 'true':
self.remote_ip = defaults.REDACTED
self.remote_host = defaults.REDACTED
self.remote_port = defaults.REDACTED
self.x_forwarded_for = defaults.REDACTED
if os.environ.get(LOG_REMOTE_USER, 'false').lower() != 'true':
self.remote_user = defaults.REDACTED
if os.environ.get(LOG_REFERER, 'false').lower() != 'true':
self.referer = defaults.REDACTED
def _hide_sensitive_fields(self):
if os.environ.get(LOG_SENSITIVE_CONNECTION_DATA, 'false').lower() != 'true':
self.remote_ip = defaults.REDACTED
self.remote_host = defaults.REDACTED
self.remote_port = defaults.REDACTED
self.x_forwarded_for = defaults.REDACTED
if os.environ.get(LOG_REMOTE_USER, 'false').lower() != 'true':
self.remote_user = defaults.REDACTED
if os.environ.get(LOG_REFERER, 'false').lower() != 'true':
self.referer = defaults.REDACTED
def _hide_sensitive_fields(self):
if os.environ.get(LOG_SENSITIVE_CONNECTION_DATA, 'false').lower() != 'true':
self.remote_ip = defaults.REDACTED
self.remote_host = defaults.REDACTED
self.remote_port = defaults.REDACTED
self.x_forwarded_for = defaults.REDACTED
if os.environ.get(LOG_REMOTE_USER, 'false').lower() != 'true':
self.remote_user = defaults.REDACTED
if os.environ.get(LOG_REFERER, 'false').lower() != 'true':
self.referer = defaults.REDACTED