Skip to content
Permalink
Browse files

do not blindly reference a sub-dict without checking the type first

  • Loading branch information
mpurzynski committed Jan 28, 2020
1 parent 1bc8512 commit bf4b19407848d9f9dfb5bef0fd589f6ddf881756
Showing with 2 additions and 1 deletion.
  1. +2 −1 cron/auth02mozdef.py
@@ -133,7 +133,8 @@ def process_msg(mozmsg, msg):
# but not for logins and other events
# check and prefer them if present.
details["username"] = msg.details.request.auth.user.name
details["action"] = msg.details.response.body.name
if type(msg.details.response.body) is not list:
details["action"] = msg.details.response.body.name
except KeyError:
pass

0 comments on commit bf4b194

Please sign in to comment.
You can’t perform that action at this time.