Skip to content

Commit

Permalink
Merge pull request #1097 from Bidaya0/feat/resbody-and-methodpool-dis…
Browse files Browse the repository at this point in the history
…play

fix(display): fix method_pool display.
  • Loading branch information
Bidaya0 committed Nov 11, 2022
2 parents e5afd14 + b31eb52 commit f4cde1e
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions dongtai_web/views/vul_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,23 @@ def parse_graphy(self, graphy):
method_counts = len(method_note_pool)
from dongtai_common.engine.compatibility import parse_target_value,highlight_target_value, method_pool_is_3
if method_note_pool and method_pool_is_3(method_note_pool[0]):
beforehighlight = ""
for method in method_note_pool:
method['ori_targetValues'] = method['targetValues']
method['ori_sourceValues'] = method['sourceValues']
method['targetValues'] = highlight_target_value(
method['ori_targetValues'],
method["targetRange"][0]["ranges"]
if "targetRange" in method.keys()
and method["targetRange"] else [])
method['sourceValues'] = parse_target_value(method['sourceValues'])
if method['tag'] == 'sink':
method['ori_targetValues'] = method['targetValues']
method['ori_sourceValues'] = method['sourceValues']
method['sourceValues'] = beforehighlight
method['ori_targetValues'] = method['targetValues']
else:
method['ori_targetValues'] = method['targetValues']
method['ori_sourceValues'] = method['sourceValues']
method['targetValues'] = highlight_target_value(
method['ori_targetValues'],
method["targetRange"][0]["ranges"]
if "targetRange" in method.keys()
and method["targetRange"] else [])
method['sourceValues'] = parse_target_value(method['sourceValues'])
beforehighlight = method['targetValues']
for i in range(method_counts):
method = method_note_pool[i]
if not isinstance(method, dict):
Expand Down

0 comments on commit f4cde1e

Please sign in to comment.