Skip to content

fix(write): enforce JSON size limit after trailing whitespace - #72

Open
efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/json-write-size-limit
Open

efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/json-write-size-limit

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

arcli write --format json could accept input larger than 64 MiB when a valid document was followed by enough whitespace to exhaust the bounded reader. Recheck the byte count after trailing-content validation so oversize input fails before conversion or upload, including when more content lies beyond the read limit. Adds boundary and command-level regression tests.

Tested on macOS arm64 with Go 1.27.1: go test -race -count=1 ./..., go vet ./..., go build ./..., gofmt -l . and git diff --check passed. The oversize regression cases failed before the fix. Linux CI and the GoReleaser snapshot have not been run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant