Skip to content

fix(auth): reject overflowing token expiry day counts - #74

Open
efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/token-expiry-overflow
Open

efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/token-expiry-overflow

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

--expires-in 106752d passed validation after wrapping to a negative duration, while 213504d wrapped to a short positive duration. Check day counts against time.Duration's whole-day range before multiplication. Adds boundary and client/CLI regression tests so overflowing expiries are rejected before token creation or update requests.

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 new overflow regressions 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