zitadel-oidc/pkg/oidc
Tim Möhlmann fa222c5efb
fix: nil pointer dereference on UserInfoAddress (#207)
* oidc: add test case to reproduce #203

Running the tests will always result in a nil pointer
dereference on UserInfoAddress.

Co-authored-by: Livio Spring <livio.a@gmail.com>

* fix: nil pointer dereference on UserInfoAddress

userinfo.UnmarshalJSON now only sets the Address field
if it was present in the json.
userinfo.GetAddress will always return a non-nil value
of UserInfoAddress to allow for safe chaining of Get functions.

Fixes #203

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2023-02-03 11:14:04 +01:00
..
grants chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
authorization.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
code_challenge.go fix: move to new org (#177) 2022-04-26 23:48:29 +02:00
discovery.go add op.AllAuthMethods (#233) 2022-10-17 08:07:19 +02:00
error.go feat: Token Revocation, Request Object and OP Certification (#130) 2021-11-02 13:21:35 +01:00
introspection.go feat: add missing IntrospectionResponse getters (#251) 2022-12-06 11:34:19 +01:00
jwt_profile.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
keyset.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
keyset_test.go add missing import 2022-01-28 09:48:37 +01:00
revocation.go feat: Token Revocation, Request Object and OP Certification (#130) 2021-11-02 13:21:35 +01:00
session.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
token.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
token_request.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
types.go fix: Add db scanner methods for SpaceDelimitedArray (#194) 2022-07-20 15:36:17 +02:00
types_test.go fix: Add db scanner methods for SpaceDelimitedArray (#194) 2022-07-20 15:36:17 +02:00
userinfo.go fix: nil pointer dereference on UserInfoAddress (#207) 2023-02-03 11:14:04 +01:00
userinfo_test.go fix: nil pointer dereference on UserInfoAddress (#207) 2023-02-03 11:14:04 +01:00
verifier.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00