Skip to content

[Security] Revoke blob URLs after download to prevent memory leaks and URL exposure #142

@magic-peach

Description

@magic-peach

Overview

Blob URLs remain in browser memory until explicitly revoked with URL.revokeObjectURL(). After a user downloads their video, the blob URL should be revoked to free memory and prevent the URL from being accessible via browser history.

Risk

  • Memory accumulation across multiple exports
  • Blob URL accessible in browser history

Implementation

In DownloadResult.tsx, after download:

const handleDownload = () => {
  // Download initiates
  // After a delay (to allow browser to process)
  setTimeout(() => URL.revokeObjectURL(result.blobUrl), 1000)
}

Also revoke in reset() function.

Acceptance Criteria

  • Blob URL revoked after download
  • Blob URL revoked on reset
  • Memory verified to not accumulate after multiple exports

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions