Skip to content
New issue

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

Handle Base64 strings that include new lines #4

Closed
alyssaruth opened this issue Apr 22, 2020 · 1 comment · Fixed by #5
Closed

Handle Base64 strings that include new lines #4

alyssaruth opened this issue Apr 22, 2020 · 1 comment · Fixed by #5

Comments

@alyssaruth
Copy link
Contributor

The current bash script in entrypoint.sh doesn't cope with Base64 strings including new line characters. Unfortunately, these are often included by default when you pipe to base64.

Supplying a string with new lines causes this action to fail with base64: invalid input. I can replicate the problem locally with the following two lines:

$ export GIT_CRYPT_KEY=$(cat ./original.key | base64)
$ echo $GIT_CRYPT_KEY | base64 --decode > ./copy.key
base64: invalid input

It looks like a simple fix - if we quote the environment variable properly then decoding works correctly. I'll raise a PR.

@ArnaudRinquin
Copy link
Contributor

@alexburlton-sonocent This was fixed and published in 1.1.0. Sorry it took time, I missed all these PRs and issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants