We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug I am trying to use yq to decode the payload of a JWT token.
While this works with jq using
$ jq -R 'split(".") | .[1] | @base64d | fromjson' <<< "$MY_TOKEN" { //... }
It fails with yq:
$ yq 'split(".") | .[1] | @base64d | fromjson' <<< "$MY_TOKEN" Error: unexpected EOF
yq fails because JWT tokens consist of base64 components that are not padded using equals signs.
$ echo "dGVzdA==" | yq "@base64d" test $ echo "dGVzdA" | yq "@base64d" Error: unexpected EOF
Version of yq: 4.30.8 Operating systems: mac/linux/windows Installed via: binary release
Actual behavior
$ echo "dGVzdA" | yq "@base64d" Error: unexpected EOF
Expected behavior
yq can handle base64 strings that are not padded.
$ echo "dGVzdA" | yq "@base64d" test # this should be returned
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Released in 4.32.1 - Thanks again @teejaded :)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
I am trying to use yq to decode the payload of a JWT token.
While this works with jq using
It fails with yq:
yq fails because JWT tokens consist of base64 components that are not padded using equals signs.
Version of yq: 4.30.8
Operating systems: mac/linux/windows
Installed via: binary release
Actual behavior
Expected behavior
yq can handle base64 strings that are not padded.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: