Skip to content

Commit

Permalink
Adding handling for previously generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-kevin committed Feb 21, 2024
1 parent a70d862 commit 35b8385
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jsjaws.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,10 @@ def _run_the_gauntlet(self, request, file_path, file_content, subsequent_run: bo
split_content = file_content.split(f"{DIVIDING_COMMENT}\n".encode())
if len(split_content) == 2:
_, script_we_did_not_generate = split_content
# Looks like a file generated by JsJaws and attached as supplementary was resubmitted for analysis.
# Therefore we have to massage the file contents
elif len(split_content) > 2:
_, script_we_did_not_generate = split_content[-2:]
else:
script_we_did_not_generate = file_content
if script_we_did_not_generate == b"" and not self.sus_form_actions:
Expand Down

0 comments on commit 35b8385

Please sign in to comment.