Skip to content

handleDownloadFile silently falls back to the first file's metadata #49

Open

Description

@Hiczownik

Where: src/fileholder-ui/src/features/download/hooks/useFileDownload.ts:177

When the file id isn't found in the metadata, handleDownloadFile uses metadata.files[0]. The decrypted file is then saved under another file's name and checked against the wrong size for the memory-cap pre-check.

Suggested fix: show an error (or re-fetch metadata) when the id isn't found, instead of falling back.

Found during a code review of the whole src tree.

Activity

  1. added
    bugSomething isn't working
    frontendBrowser / React app
    downloadDownloading and saving files
    P3Priority 3: minor or cosmetic
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Priority 3: minor or cosmeticbugSomething isn't workingdownloadDownloading and saving filesfrontendBrowser / React app

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions