Repository navigation
Reject typed nil at Verify time - #285
Merged
Merged
Conversation
jsha
approved these changes
Sep 3, 2026
jsha
left a comment
Collaborator
There was a problem hiding this comment.
Nice ergonomic improvement, thanks!
Contributor
Author
your welcome! |
Doridian
pushed a commit
to FoxDenHome/core
that referenced
this pull request
Oct 3, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/go-jose/go-jose/v4](https://github.com/go-jose/go-jose) | `v4.1.4` → `v4.1.5` |  |  | --- ### Release Notes <details> <summary>go-jose/go-jose (github.com/go-jose/go-jose/v4)</summary> ### [`v4.1.5`](https://github.com/go-jose/go-jose/releases/tag/v4.1.5) [Compare Source](go-jose/go-jose@v4.1.4...v4.1.5) ### Fixed security issues - cipher/cbc\_hmac: don't panic on empty ciphertext ([#​292](go-jose/go-jose#292)) - cipher/cbc\_hmac: don't panic on invalid key ([#​291](go-jose/go-jose#291)) - json: limit stack depth ([#​290](go-jose/go-jose#290)) - jwt: reject out-of-range NumericDate values ([#​278](go-jose/go-jose#278)) - Check alg against pubkey curve during verify. ([#​293](go-jose/go-jose#293)) - Reject malformed [`Ed25519`](go-jose/go-jose@Ed25519) JWKs ([#​250](go-jose/go-jose#250)) - jws: choose verification key per-signature ([#​243](go-jose/go-jose#243)) ### Breaking Changes In [#​226](go-jose/go-jose#226), we un-exported jose.RandReader. This was used to be able to stub out the randomness function in tests, but is ignored as of Go 1.26 in some APIs, so no longer serves a useful function. ### Changed - Verify OpaqueSigner's Public() return is public ([#​260](go-jose/go-jose#260)) - jws: skip signature on ErrJWKSKidNotFound ([#​248](go-jose/go-jose#248)) - Handle JWE JSON without protected header ([#​240](go-jose/go-jose#240)) - jws: don't strip internal whitespace before parsing JSON ([#​239](go-jose/go-jose#239)) - jws: fewer calls to OpaqueSigner.Public() ([#​224](go-jose/go-jose#224)) - Return a specific error when parsing empty string ([#​216](go-jose/go-jose#216)) - Reject typed nil at Verify time ([#​285](go-jose/go-jose#285)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjEuMyIsInVwZGF0ZWRJblZlciI6IjQ0LjEyMS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://git.foxden.network/FoxDen/core/pulls/168
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.
Problem
Typed-nil public keys satisfy
newVerifier's type switch and reach the cryptographic verifier. Ed25519, ECDSA, and RSA then panic instead of returning an error. A nil*JSONWebKeyalso panics when it is dereferenced during verifier construction.Changes
invalid verification keyerror for these inputs.User impact
Applications that accidentally pass a typed-nil verification key now receive a normal error instead of crashing the process.
Verification
go build ./...— passedgo test ./... -count=1— passedgo test . -run '^(TestJWSNilVerificationKey|TestJWSInvalidKey)$' -count=1— passedgo vet .— passedgofmt -l .— cleangit diff --check— passedRepository-wide
go vet ./...additionally reports the existing intentionally malformed struct-tag fixtures injson/decode_test.goandjson/tagkey_test.go; the changed package is clean.Fixes #283