Correctly propagate the source ip address to the details.sourceipaddress

This commit is contained in:
Michal Purzynski 2019-04-03 15:34:02 -07:00
Родитель ba33a0c0c0
Коммит d1c1990d88
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -111,10 +111,12 @@ def process_events(mozmsg, duo_events, etype, state):
details[i] = e[i]
mozmsg.set_category(etype)
mozmsg.details = normalize(details)
if "access_device" in details:
if "ip" in details["access_device"]:
mozmsg.details["sourceipaddress"] = details["access_device"]["ip"]
localdetails = normalize(details)
if "access_device" in localdetails:
if "ip" in localdetails["access_device"]:
localdetails["sourceipaddress"] = localdetails["access_device"]["ip"]
mozmsg.details = localdetails
del(localdetails)
if etype == "administration":
mozmsg.summary = e["action"]
elif etype == "telephony":