derailed / k9s

🐶 Kubernetes CLI To Manage Your Clusters In Style!
https://k9scli.io
Apache License 2.0
27.54k stars 1.73k forks source link

Incomplete decoded secrets #2693

Open marcofranssen opened 6 months ago

marcofranssen commented 6 months ago




Describe the bug

When decoding the following hypothetical secret {ofUfac]>t[898dfs it only shows the first part of the secret up till the [ character in the secret like this {ofUfac]>t.

So in essence as

- {ofUfac]>t[898dfs
+ {ofUfac]>t

To Reproduce Steps to reproduce the behavior:

  1. Create a secret like this {ofUfac]>t[898dfs
  2. Navigate to the secret in k9s
  3. Press x to decode the secret
  4. The decoded secret shows as {ofUfac]>t
  5. Now decode the secret using kubectl (kubectl get secret my-secret -o jsonpath='{.data.password}' | base64 -d)
  6. The decoded secret shows correctly as {ofUfac]>t[898dfs

Historical Documents

Expected behavior

Secrets with special characters decode properly from k9s.

Screenshots

N.A.

Versions (please complete the following information):

Additional context

So far only detected it for a secret containing [ at which it stops processing.

ksemele commented 3 weeks ago

So... It works for me... Try to update your k9s

Version:    v0.32.5
Commit:     1440643e8d1a101a38d9be1933131ddf5c863940
Date:       2024-06-15T17:11:02Z
# decoded secret
test: '{ofUfac]>t[898dfs'       
# secret
 kg secret test -o yaml
apiVersion: v1
data:
  test: e29mVWZhY10+dFs4OThkZnM=
kind: Secret
metadata:
  creationTimestamp: "2024-11-08T20:02:06Z"
  name: test
  namespace: default
  resourceVersion: "98505"
  uid: c68e1b53-6d82-4cb9-818a-d6742875bfd7
type: Opaque