Detect unconfigured E2E setup and unauthorized chunk uploads in CLI - #429
Merged
Forceu merged 1 commit intoSep 12, 2026
Merged
Conversation
…ds in CLI - GetE2eInfo now returns a distinct ErrE2eNotSetUp when end-to-end encryption hasn't been set up on the server yet, instead of falling through to a generic decryption failure. cliconfig.go's login flow reports this with a clear message instead of an opaque error. - uploadChunk now translates a 401 response into ErrUnauthorised instead of a generic "status code 401" error message. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0168YUwGEzEHTqd9CwzXE53d
Owner
|
Thank you! |
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.
Description
Two small CLI uploader error-detection improvements found while going through its outstanding
// TODOmarkers:cliapi.GetE2eInfofailed decryption with an opaqueErrE2eKeyIncorrect-style error whenever a server hadn't had end-to-end encryption set up at all yet — indistinguishable from actually entering the wrong key. It now checksresult.HasBeenSetUp()first and returns a distinctErrE2eNotSetUp, andcliconfig.go's login flow reports that case with a clear, actionable message instead.uploadChunktreated a401 Unauthorizedchunk-upload response the same as any other non-200 status, printing a generic"status code 401"message. It now translates that into the existingErrUnauthorisedsentinel, matching how the rest of the CLI already reports auth failures.Type of Change
Technical Details
How Has This Been Tested?
go test ./... --tags=test,awsmock(full suite passes;cmd/cli-uploaderhas no existing test files to extend)Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_0168YUwGEzEHTqd9CwzXE53d