#495 #496: hide server-internal temp names; atomic overwriting MOVE/COPY #504

Merged
Cordy merged 3 commits from fix-495-496 into main 2026-09-12 16:03:49 +00:00
Owner

Wave 4 of the hardening set.

  • #495: .cairn-upload-* temps (and .cairn-replace-* staged copies) are server-internal names — never listed, Stat/Open answer not-found, and PUT/MKCOL of such names is refused, so other WebDAV clients (Finder, rclone, mobile) never see a half-written file appear and vanish.
  • #496: overwriting MOVE/COPY never deletes the destination first. File-onto-file replaces atomically via rename (posix copyFile now goes through temp-then-rename too, so COPY overwrite never truncates in place); anything involving a collection stages the old destination aside and restores it on failure — and if even the restore fails, the response names where the original is parked instead of losing it silently.
  • Fault-injection tests: failed file-overwrite MOVE keeps the destination; failed dir-overwrite MOVE and COPY restore it with no staged leftovers. All witnessed red first; full suite green.
Wave 4 of the hardening set. - **#495**: `.cairn-upload-*` temps (and `.cairn-replace-*` staged copies) are server-internal names — never listed, `Stat`/`Open` answer not-found, and PUT/MKCOL of such names is refused, so other WebDAV clients (Finder, rclone, mobile) never see a half-written file appear and vanish. - **#496**: overwriting MOVE/COPY never deletes the destination first. File-onto-file replaces atomically via rename (posix `copyFile` now goes through temp-then-rename too, so COPY overwrite never truncates in place); anything involving a collection stages the old destination aside and restores it on failure — and if even the restore fails, the response names where the original is parked instead of losing it silently. - Fault-injection tests: failed file-overwrite MOVE keeps the destination; failed dir-overwrite MOVE and COPY restore it with no staged leftovers. All witnessed red first; full suite green.
Cordy merged commit 54fd77365d into main 2026-09-12 16:03:49 +00:00
Cordy deleted branch fix-495-496 2026-09-12 16:03:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#504
No description provided.