Remove uploaderID from public relays to avoid real time tracking of user without consent

This commit is contained in:
AnthorNet 2018-01-27 09:37:26 +01:00
parent f13b4dfc30
commit a221ae13c3
2 changed files with 5 additions and 1 deletions

View File

@ -146,7 +146,7 @@ def parse_and_error_handle(data):
parsed_message['header']['gatewayTimestamp'] = datetime.utcnow().isoformat() + 'Z'
parsed_message['header']['uploaderIP'] = get_remote_address()
# Sends the parsed to the Relay/Monitor as compressed JSON.
# Sends the parsed message to the Relay/Monitor as compressed JSON.
gevent.spawn(push_message, parsed_message, parsed_message['$schemaRef'])
logger.info("Accepted %s upload from %s" % (
parsed_message, get_remote_address()

View File

@ -95,6 +95,10 @@ class Relay(Thread):
statsCollector.tally("duplicate")
return
# Remove ID to end consumer (Avoid realtime user tracking without their consent)
if 'uploaderID' in json['header']:
del json['header']['uploaderID']
# Remove IP to end consumer
if 'uploaderIP' in json['header']:
del json['header']['uploaderIP']