Skip to content

db: stop a burned paste from surviving in the file - #230

Open
cgzones wants to merge 1 commit into
matze:masterfrom
cgzones:db-secure-delete
Open

cgzones wants to merge 1 commit into
matze:masterfrom
cgzones:db-secure-delete

Conversation

@cgzones

@cgzones cgzones commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

sqlite only unlinks the page, so the plaintext of a burn-after-reading entry stayed in the freelist and came back out of the file, a backup or a snapshot long after the paste was promised destroyed. Turn on secure_delete.

The file also holds every unencrypted paste and was created 0644, so on a shared host any local account could read the lot. Tighten it to 0600, but only when this process created it — an existing file keeps the mode the operator chose.

sqlite only unlinks the page, so the plaintext of a burn-after-reading entry
stayed in the freelist and came back out of the file, a backup or a snapshot
long after the paste was promised destroyed. Turn on `secure_delete`.

The file also holds every unencrypted paste and was created 0644, so on a
shared host any local account could read the lot. Tighten it to 0600, but only
when this process created it — an existing file keeps the mode the operator
chose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant