messere1 opened a new issue, #1686:
URL: https://github.com/apache/rocketmq-dashboard/issues/1686

   ### Description
   The shared `downloadBlob` helper appends a temporary anchor, calls 
`anchor.click()`, then removes the anchor and revokes the Blob URL. Cleanup is 
not protected by `finally`.
   
   If browser download activation throws (for example because it is blocked by 
an embedded browser policy or an overridden click implementation), the 
exception correctly reaches the caller, but the hidden anchor remains in the 
document and the object URL is never revoked. Repeated failed exports leak both 
DOM nodes and Blob-backed memory.
   
   The helper is shared by audit, alert-rule, DLQ, and message exports.
   
   ### Expected behavior
   Download errors should still propagate, while the temporary anchor and 
object URL are always cleaned up.
   
   ### Actual behavior
   Cleanup runs only after a successful click.
   
   ### Proposed fix
   Wrap download activation in `try/finally`, retain the existing success 
behavior, and add a unit test that forces `click()` to throw and verifies 
cleanup plus error propagation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to