Skip to content

[VIRTS-4674] Resolve Empty PDF Generation Issues#67

Merged
mkultraWasHere merged 2 commits into
masterfrom
bleepbop/VIRTS-4674/fix-debrief-pdf-errors
Sep 8, 2023
Merged

[VIRTS-4674] Resolve Empty PDF Generation Issues#67
mkultraWasHere merged 2 commits into
masterfrom
bleepbop/VIRTS-4674/fix-debrief-pdf-errors

Conversation

@bleepbop

@bleepbop bleepbop commented Aug 25, 2023

Copy link
Copy Markdown
Contributor

Description

When running an operation that generates long facts, users were encountering an error when attempting to export the operation to a PDF. The issue was due to an extremely long fact value that caused the table row to span multiple pages, which caused in error in the reportlab.platypus library.

As row heights need to be dynamically generated, I reduced the TABLE_CHAR_LIMIT (the maximum length of a fact value) to something that would restrict the row to one page at the most.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Prior to this update, the bug could be reproduced by the following steps:
1). Start agent and operation. When creating the operation. use the 'Discovery' adversary.
2). When the operation finished, go to Debrief, select the operation you just ran, and click Download PDF Report.
3). Ensure that the facts table is selected, and click download. The resulting PDF would be 0 bytes due to the error.

Now, the fact table will load correctly, and the PDF can be downloaded successfully.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bleepbop bleepbop marked this pull request as ready for review August 25, 2023 19:36
@bleepbop bleepbop requested a review from clenk August 25, 2023 19:37
@mkultraWasHere mkultraWasHere requested review from mkultraWasHere and removed request for clenk September 8, 2023 15:23
@mkultraWasHere mkultraWasHere merged commit eca3349 into master Sep 8, 2023
@mkultraWasHere mkultraWasHere deleted the bleepbop/VIRTS-4674/fix-debrief-pdf-errors branch September 8, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants