Add uploader key to header section if we have a salt.

This commit is contained in:
James Muscat 2014-12-18 13:04:15 +00:00
parent 1b71ceda27
commit ddeca9f00c

View File

@ -127,7 +127,7 @@ def parse_and_error_handle(data):
# If an IP hash is set, salt+hash the uploader's IP address and set # If an IP hash is set, salt+hash the uploader's IP address and set
# it as the EMDR upload key value. # it as the EMDR upload key value.
ip_hash = hashlib.sha1(ip_hash_salt + get_remote_address()).hexdigest() ip_hash = hashlib.sha1(ip_hash_salt + get_remote_address()).hexdigest()
parsed_message.upload_keys.append({'name': 'EMDR', 'key': ip_hash}) parsed_message['header']['uploaderKey'] = ip_hash
# Sends the parsed MarketOrderList or MarketHistoryList to the Announcers # Sends the parsed MarketOrderList or MarketHistoryList to the Announcers
# as compressed JSON. # as compressed JSON.