mirror of
https://github.com/status-im/consul.git
synced 2025-02-18 16:46:36 +00:00
Fix substring length on obfuscated token
This commit is contained in:
parent
4bd5523276
commit
912887a4db
@ -183,7 +183,7 @@ func (c *aclCache) lookupACL(id, authDC string) (acl.ACL, error) {
|
|||||||
s := id
|
s := id
|
||||||
// Print last 3 chars of the token if long enough, otherwise completly hide it
|
// Print last 3 chars of the token if long enough, otherwise completly hide it
|
||||||
if len(s) > 3 {
|
if len(s) > 3 {
|
||||||
s = fmt.Sprintf("token ending in '%s'", s[len(s)-1:])
|
s = fmt.Sprintf("token ending in '%s'", s[len(s)-3:])
|
||||||
} else {
|
} else {
|
||||||
s = redactedToken
|
s = redactedToken
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user