Problem

VaultExporter writes a fully decrypted ZIP of the owner's entire vault (every file and record) to private://pdv-export/{uuid}.zip -- a raw filesystem path, not a managed file. The only cleanup is VaultExportForm's BinaryFileResponse::deleteFileAfterSend(TRUE), which runs only when the download completes. If the connection drops or any error occurs mid-stream, the plaintext archive is left at rest indefinitely: core's temporary-file cron never touches it (not a managed file) and pdv's GarbageCollector never sweeps that directory. Over time it accumulates full plaintext copies of users' vaults -- the opposite of the "nothing decrypted is left at rest" design.

Uploads in private://pdv-uploads are NOT affected: they are managed temporary files, reaped by core's file cron and deleted in the upload form's finally{}.

Fix

Add a bounded cron sweep in GarbageCollector::collect() that deletes export bundles older than a short max-age (mirroring the other reapers), plus kernel coverage.

Issue fork pdv-3595883

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

  • mably committed bce704e2 on 1.x
    fix: #3595883 Decrypted vault export ZIP can be left at rest in private...
mably’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.