codacy and lint hints

This commit is contained in:
Pascal Fischer
2023-03-20 11:44:12 +01:00
parent 628a201e31
commit b852198f67
7 changed files with 53 additions and 24 deletions

View File

@@ -1127,8 +1127,8 @@ func (am *DefaultAccountManager) GetAccountFromPAT(token string) (*Account, *Use
if prefix != PATPrefix {
return nil, nil, fmt.Errorf("token invalid")
}
secret := token[len(PATPrefix) : len(PATPrefix)+PATsecretLength]
encodedChecksum := token[len(PATPrefix)+PATsecretLength : len(PATPrefix)+PATsecretLength+PATChecksumLength]
secret := token[len(PATPrefix) : len(PATPrefix)+PATSecretLength]
encodedChecksum := token[len(PATPrefix)+PATSecretLength : len(PATPrefix)+PATSecretLength+PATChecksumLength]
verificationChecksum, err := base62.Decode(encodedChecksum)
if err != nil {