Repository navigation
Protect the SQLite database and verify media before replacing a backup - #3733
Merged
pournasserian merged 5 commits intoNov 28, 2026
Merged
Conversation
pournasserian
marked this pull request as draft
November 28, 2026 00:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3724
Closes #3725
What
FCMS3254). Check it before opening SQLite or creating files. The output must name a file, not an existing directory or a link to one. Ordinary sibling archives remain replaceable. A linked media root is supported; nested directory symlinks/junctions are refused, not traversed or silently skipped. A file link is allowed only if its target resolves and the archive cannot replace it. The preflight and copy phases enforce the same policy.FCMS3255). Include snapshot-required named.tmporiginals but not unrelated scratch files. A newer upload is allowed; cloud originals stay the storage operator’s responsibility. No changes to retention or SVG handling.Why
An output mistake could replace the live database. Independently, replacing media during backup could produce a successful archive whose database names a file the archive does not contain. Either refusal leaves protected inputs and the prior archive intact. Verifying the staged bytes adds a read of the archived originals.
Dependencies: No new packages. Path resolution uses existing Windows/POSIX system APIs. As documented, ambiguous path spellings are refused; use a distinct backup directory and a trusted, stable mount layout. The command does not detect two bind mounts or shares exposing the same storage.
Checklist
.tmporiginals, unrelated scratch files, and preservation of the previous archive.BackupDestinationTests: 10 passed, 5 skipped (4 POSIX-only and 1 requiring Windows file-symlink privilege); dataBackupCommandTests: 24 passed, 2 platform/provider cases skipped. Regression cases cover nested junctions and cycles, a link added after snapshot, and a linked root whose contents were backed up correctly. Feature CI on the final head passed on Windows and Ubuntu. The Ubuntu TRX confirms that the linked-file target, external directory link and POSIX link traversal regressions actually ran and passed.Checkpoint into
feature/stabilize-preview-2; leave unmerged for maintainer review.