Skip to content

Prevent duplicate downloads on export/download buttons - #1659

Merged
nscuro merged 2 commits into
DependencyTrack:4.14.xfrom
tecan:fix/vex-export-double-click
Jul 16, 2026
Merged

Prevent duplicate downloads on export/download buttons#1659
nscuro merged 2 commits into
DependencyTrack:4.14.xfrom
tecan:fix/vex-export-double-click

Conversation

@heyiamwahab236

Copy link
Copy Markdown

Description

Export/download buttons started a new download on every click with no
in-progress guard, so clicking (or double-clicking) while a download was
already running triggered multiple simultaneous requests and duplicate file
downloads. This affected the project Findings view (Export VEX, Export VDR)
and the project Components view (Download BOM — inventory / with-vulnerabilities,
and Download component — CSV).

Each handler now sets an in-progress flag with a guarded early return, disables
the corresponding button/dropdown and shows a spinner while the export runs, and
resets the flag in a finally() block so the control re-enables whether the
download succeeds or fails.

Addressed Issue

fixes #1658

Additional Details

The frontend project has no component unit-test harness, so this was verified
manually: with the Network tab open (throttled to Slow 3G to widen the window),
rapid/double clicks on each export control now send only one request and produce
a single download, and the control re-enables after completion or error. Verified
on the Findings (VEX/VDR) and Components (BOM/CSV) views.

Checklist

The 'Export VEX' and 'Export VDR' buttons had no guard against repeated
clicks. Each click started a new blob download, so clicking while a
download was already in progress triggered multiple simultaneous
requests and duplicate file downloads.

Each handler now sets an in-progress flag (guarded early-return),
the corresponding button is disabled and shows a spinner while the
export runs, and the flag is reset in a finally() block so the button
re-enables whether the download succeeds or fails.

Signed-off-by: Abdul Wahab Shah <abdul.shah@tecan.com>
The 'Download BOM' (inventory / with-vulnerabilities) and 'Download
component' (CSV) dropdowns on the project Components view had no guard
against repeated clicks, so each click started a new download and
clicking while one was in progress produced duplicate downloads.

Each handler now sets an in-progress flag (guarded early-return), the
corresponding dropdown is disabled and shows a spinner while the export
runs, and the flag is reset in finally() so it re-enables whether the
download succeeds or fails.

Signed-off-by: Abdul Wahab Shah <abdul.shah@tecan.com>
@owasp-dt-bot

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Image Critical Image High Image Medium Image Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@heyiamwahab236

Copy link
Copy Markdown
Author

@setchy Can you please have a look at this please.

@nscuro nscuro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nscuro nscuro added this to the 4.14.3 milestone Jul 16, 2026
@nscuro nscuro added enhancement New feature or request defect Something isn't working and removed enhancement New feature or request labels Jul 16, 2026
@nscuro
nscuro merged commit 00830c9 into DependencyTrack:4.14.x Jul 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants