Skip to content

Commit

Permalink
Fix pedantic string check for nul in access token generator command.
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain-ALM committed Jun 9, 2024
1 parent d76a534 commit a0d03c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/mjwt/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (s *accessCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}
}

var token string
if len(s.kID) == 1 && s.kID[0] == '\x00' {
if s.kID == "\x00" {
signer := mjwt.NewMJwtSigner(s.issuer, key)
token, err = signer.GenerateJwt(s.subject, s.id, aud, dur, auth.AccessTokenClaims{Perms: ps})
} else {
Expand Down

0 comments on commit a0d03c0

Please sign in to comment.