Repository navigation
fix(server): expiry before password, required key material, safe names, no leaked uploads (#38, #39, #40, #43, #52) - #68
Merged
Conversation
…ed names, no leaked multipart uploads - Opening a download session checks expiry and the download limit before the password, as unlocking does: guesses at a dead bundle get 410 without running bcrypt or counting towards a lockout. (#43) - Encrypted confirms must carry a salt, key envelope and manifest, as unpadded base64url; a bundle without them got a share link nobody could ever open. (#52) - SanitizeFileName caps the extension at 64 characters, so even "unnamed_file" plus the extension fits the varchar(255) column, and names made only of dots fall back to "unnamed_file". The browser's copy follows the same rules. (#39, #40) - If presign fails partway (a later initiate or the save), the multipart uploads it already started are aborted; no session row records them, so the purge never could. (#38) Fixes #38 Fixes #39 Fixes #40 Fixes #43 Fixes #52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
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.
PR A of the P2 plan: five small server fixes, each with a test.
OpenSessionAsyncchecks expiry and the download limit before the password, likeUnlockGroupAsync. A dead bundle answers 410 without running bcrypt or adding toFailedPasswordAttempts.KeySalt,KeyEnvelopeandEncryptedManifestare required and must be unpadded base64url (newMustBeKeyMaterialrule inBundleRules). No exact lengths, to leave room for the planned CLI (#66).SanitizeFileNamecaps the extension at 64 characters. The body is already capped at 190, so the result is at most 254..,..,...) fall back tounnamed_file.fileNameSafety.tsalready did this, and now has the same extension cap.Tests
InitiateMultipartUploadfor keys containinginitiate_fail, like the existingnon_existent/delete_failhooks.tscandeslintare clean.The existing "encryption mode differs from presign" check now sends key material, so it still tests the service's mismatch check and not the new validator rule.
🤖 Generated with Claude Code