commit 81d05bdd15bf68c271cac5b0cde257372f7b4892 Author: Arturo Filastò arturo@filasto.net Date: Tue Mar 15 14:48:06 2016 +0100
When GeoIP lookup is disabled it's not possible to perform sanitisations --- ooni/templates/httpt.py | 2 +- ooni/templates/process.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ooni/templates/httpt.py b/ooni/templates/httpt.py index d0822f2..12995bb 100644 --- a/ooni/templates/httpt.py +++ b/ooni/templates/httpt.py @@ -135,7 +135,7 @@ class HTTPTest(NetTestCase): } if response: # Attempt to redact the IP address of the probe from the responses - if config.privacy.includeip is False: + if config.privacy.includeip is False and config.probe_ip.address is not None: response_body = response_body.replace(config.probe_ip.address, "[REDACTED]") request_response['response'] = { 'headers': list(response.headers.getAllRawHeaders()), diff --git a/ooni/templates/process.py b/ooni/templates/process.py index 42a4256..faf0a66 100644 --- a/ooni/templates/process.py +++ b/ooni/templates/process.py @@ -108,7 +108,7 @@ class ProcessTest(NetTestCase): self.report['commands'] = []
# Attempt to redact the IP address of the probe from the standard output - if config.privacy.includeip is False: + if config.privacy.includeip is False and config.probe_ip.address is not None: result['stdout'] = result['stdout'].replace(config.probe_ip.address, "[REDACTED]") result['stderr'] = result['stderr'].replace(config.probe_ip.address, "[REDACTED]")