diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-01-09 21:13:05 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-01-09 21:13:05 -0300 |
commit | 43de35a50d17a764b2746998d81d7957629a5ff7 (patch) | |
tree | 2d24998c13e6e2c86d6f92fef80821b5080100a6 /mail | |
parent | 69a39f836bbdd4ac19b304d2a39529676fe227ca (diff) | |
parent | a837569a27e20a0faaed9c6fd540f28270305d91 (diff) |
Merge remote-tracking branch 'refs/remotes/kali/bug/nonecheck-for-innerheaders' into develop
Diffstat (limited to 'mail')
-rw-r--r-- | mail/src/leap/mail/walk.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mail/src/leap/mail/walk.py b/mail/src/leap/mail/walk.py index dc13345d..18717529 100644 --- a/mail/src/leap/mail/walk.py +++ b/mail/src/leap/mail/walk.py @@ -111,8 +111,8 @@ def walk_msg_tree(parts, body_phash=None): # parts vector pv = list(get_parts_vector(parts)) - if len(parts) == 2: - inner_headers = parts[1].get("headers", None) + inner_headers = parts[1].get("headers", None) if ( + len(parts) == 2) else None if DEBUG: print "parts vector: ", pv @@ -155,7 +155,8 @@ def walk_msg_tree(parts, body_phash=None): pdoc["part_map"][1]["multi"] = False if not pdoc["part_map"][1].get("phash", None): pdoc["part_map"][1]["phash"] = body_phash - pdoc["part_map"][1]["headers"] = inner_headers + if inner_headers: + pdoc["part_map"][1]["headers"] = inner_headers else: pdoc = outer pdoc["body"] = body_phash |