From a0d03c0dfb2e8b1a6cd7004b40b196245cfcbb6a Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Sun, 9 Jun 2024 20:46:25 +0100 Subject: [PATCH] Fix pedantic string check for nul in access token generator command. --- cmd/mjwt/access.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mjwt/access.go b/cmd/mjwt/access.go index 113d3e7..a2cb35e 100644 --- a/cmd/mjwt/access.go +++ b/cmd/mjwt/access.go @@ -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 {