Skip to content

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

Merged
dnwe merged 2 commits intoIBM:mainfrom
hoo47:fix/token
Jan 14, 2025
Merged

fix(sasl): add nilguard around token to prevent panic#3076
dnwe merged 2 commits intoIBM:mainfrom
hoo47:fix/token

Conversation

@hoo47
Copy link
Copy Markdown
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 {

@puellanivis
Copy link
Copy Markdown
Collaborator

👍

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
Copy Markdown
Collaborator

dnwe commented Jan 14, 2025

Thanks! LGTM

@dnwe dnwe merged commit 4ffab23 into IBM:main Jan 14, 2025
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