Bump jdtw.dev/token to v0.1.6 - #25
Merged
Merged
Conversation
Picks up two fixes: - serverResource no longer double-unescapes the request path, which could reject legitimately-signed requests (or, for a consumer that scopes tokens per-resource, allow a token to authorize a resource other than the one it was signed for). - MapVerifier.pruned now advances correctly, so nonce pruning is scheduled once per window instead of spawning a goroutine on every single Verify call once the first window has elapsed. Verified with go test ./... and the full docker-based integration suite (./docker_test.sh) against a real Postgres instance, exercising the actual sign/verify and nonce-checking path this app depends on. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
Bumps
jdtw.dev/tokenv0.1.5 → v0.1.6, picking up two fixes from jdtw/token#3:serverResourceno longer double-unescapes the request path. It could reject legitimately-signed requests whose path contains a literal%followed by hex digits, and more importantly broke the invariant that the resource a client signs matches the resource the server checks.MapVerifier.prunednow advances correctly, so nonce pruning is scheduled once per window instead of spawning a new goroutine on every singleVerifycall once the first window has elapsed -- this is the nonce verifierlinksactually uses (pkg/links/server.go).Test plan
go build ./...go vet ./...go test ./..../docker_test.sh-- full integration suite against a real Postgres instance, exercising the actual sign/verify and nonce-checking path🤖 Generated with Claude Code