You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tokenIDOrToken, subject, accessTokenClaims, ok = getTokenIDAndClaims(ctx, exchanger, token)
if !ok {
break
}
claims = accessTokenClaims.Claims
And the getTokenIDAndClaims function has a return case at L424:
return splitToken[0], splitToken[1], nil, true
When this codepath is hit, ok is true, then the accessTokenClaims is a nil point, which is accessed.
Second bug: this usecase is not covered by unit tests.
To reproduce
Try to do a token exchange which is hitting this codepath (user initiates a client credential grant flow, then tries to exchange the token to have the audience match the resource provider it is trying to access).
Screenshots
No response
Expected behavior
The token exchange working properly.
Additional Context
Discord gladly has thrown some errors which thankfully made me unable to join.
The text was updated successfully, but these errors were encountered:
Preflight Checklist
Version
3.34.1 and master branch
Describe the problem caused by this bug
In
pkg/op/exchange_token.go
:From L309-313:
And the
getTokenIDAndClaims
function has a return case at L424:When this codepath is hit, ok is true, then the
accessTokenClaims
is a nil point, which is accessed.Second bug: this usecase is not covered by unit tests.
To reproduce
Try to do a token exchange which is hitting this codepath (user initiates a client credential grant flow, then tries to exchange the token to have the audience match the resource provider it is trying to access).
Screenshots
No response
Expected behavior
The token exchange working properly.
Additional Context
Discord gladly has thrown some errors which thankfully made me unable to join.
The text was updated successfully, but these errors were encountered: