docs icon indicating copy to clipboard operation
docs copied to clipboard

add new line to the encoded passKey to allow correctly be decoded

Open manolo opened this issue 1 year ago • 3 comments

related to: https://github.com/vaadin/control-center/issues/519

manolo avatar Sep 19 '24 16:09 manolo

I have tested on another machine. There I get a % char after the decoded passkey. Is that the issue? We could safely strip that server side.

heruan avatar Sep 19 '24 17:09 heruan

Take a look to the attached screenshot to see what happens in my machine:

  • macOS: Sonoma 14.5
  • docker desktop: 4.33
  • k8s: v1.32.0 (delivered with docker desktop)
  • iTerm: 3.5.4

As you can see running the full command without the NL base64 does not decodes anything. Also you can see that running only the kubectl command without the pipe, the output does not have any NL at the end so that is the problem.

Screenshot 2024-09-20 at 08 01 48

Note it's not a problem of base64, since the equivalent openssl base64 -d has the same error

Screenshot 2024-09-20 at 09 39 02

In any case merging this PR is safe since adding multiples new lines after the encoded string does not affect the result

manolo avatar Sep 20 '24 07:09 manolo

As you can see running the full command without the NL base64 does not decodes anything.

I think this is a problem from the terminal configuration, that somehow does not show the line. I can't replicate this with the default iTerm configuration. At this point I would go with the suggested change, so we only use kubectl and it already adds a newline to the output.

heruan avatar Sep 20 '24 07:09 heruan

Fixed in #3752

heruan avatar Oct 15 '24 06:10 heruan