Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sasl): add nilguard around token to prevent panic #3076

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Conversation

hoo47
Copy link
Contributor

@hoo47 hoo47 commented Jan 10, 2025

description

  • Currently, there is no Token nil inspection.
  • as-is: if token.Extensions != nil && len(token.Extensions) > 0 {
  • to-be: if token != nil && token.Extensions != nil && len(token.Extensions) > 0 {

broker.go Outdated Show resolved Hide resolved
broker.go Outdated Show resolved Hide resolved
@puellanivis
Copy link
Contributor

👍

hoo47 added 2 commits January 14, 2025 13:58
Signed-off-by: hoo47 <[email protected]>

Signed-off-by: hoo47 <[email protected]>
Signed-off-by: hoo47 <[email protected]>
Signed-off-by: hoo47 <[email protected]>
@hoo47 hoo47 requested a review from puellanivis January 14, 2025 04:59
@dnwe dnwe changed the title chore: avoid NPE when token is nil fix(sasl): add nilguard around token to prevent panic Jan 14, 2025
@dnwe dnwe added the fix label Jan 14, 2025
@dnwe
Copy link
Collaborator

dnwe commented Jan 14, 2025

Thanks! LGTM

@dnwe dnwe merged commit 4ffab23 into IBM:main Jan 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants