Refactor by removing unnecessary []byte conversion to string (#330)

This commit is contained in:
Oleksandr Redko 2023-08-03 18:26:45 +03:00 committed by GitHub
parent 8b7470d561
commit fc86f52277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ func (m *signingMethodNone) Verify(signingString string, sig []byte, key interfa
return NoneSignatureTypeDisallowedError
}
// If signing method is none, signature must be an empty string
if string(sig) != "" {
if len(sig) != 0 {
return newError("'none' signing method with non-empty signature", ErrTokenUnverifiable)
}