Repository navigation
fix: cancel failed sessions, 0-byte files, no symlinks, 0600 manifest, push skips dotfiles - #13
Merged
Merged
Conversation
…, push skips dotfiles - Cancel the pending upload session on failure (not when only the finalize answer was lost). - Upload 0-byte files as a header-only cipher-v3 object when the server advertises emptyCipherV3; otherwise skip before creating a session. - lstat instead of stat when listing; open with O_NOFOLLOW. - Write the sync manifest with mode 0600. - push skips dotfiles unless --include-dotfiles. - README and npm description state the actual encryption scheme.
This was referenced Oct 12, 2026
Merged
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.
Batch I (10-10 remediation plan), CLI items. Each checked against origin/main first; all six were still open.
create-upload-sessionnow callsPOST /api/files/delete {ids:[fileId]}(the web app's cancel path: cancels the B2 large file and drops the non-ready row). Best-effort; the original error is rethrown. Skipped when thecomplete-uploadrequest itself threw (outcome unknown), so a finalized file is never binned.GET /api/files/upload-capabilities; ifemptyCipherV3is true it uploads the header-only object with the server's empty-file proof (base64([3][3] || HMAC(proofKey, [3][3] || header)), matching webutils/emptyFileUploadProofClient.ts). If false (the prod default whileEMPTY_V3_UPLOADS_ENABLEDis unset) the file is skipped before any session exists, push printsskipped <name>and exits 2.push/encryptlisting,syncscan and the agent'supload; files opened withO_NOFOLLOWto close the swap race..tmpleft by a crashed run (handle.chmod).--include-dotfilesto include. Sync already skipped them.Tests:
npm test151/151 locally, including newtest/upload.hardening.test.mjs(7 cases). Not released; founder publishes.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.