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

Single quotes in value are not escaped properly #13

Open
wdegeus opened this issue Mar 13, 2018 · 0 comments
Open

Single quotes in value are not escaped properly #13

wdegeus opened this issue Mar 13, 2018 · 0 comments

Comments

@wdegeus
Copy link

wdegeus commented Mar 13, 2018

We just ran into an issue where we had some HTML in an environment variable which was quoted, so for example:
aws ssm put-parameter --name /my/path/HTML_BODY --value "'Lorem Ipsum<br><br>'" --type String

Now eval $(aws-env) breaks:
AWS_ENV_PATH=/my/path aws-env-linux-amd64 export HTML_BODY=$''Lorem Ipsum<br><br>''

eval $(AWS_ENV_PATH=/my/path aws-env-linux-amd64)
-bash: syntax error near unexpected token '<'

If aws-env would escape these we would not have a problem:

$ export HTML_BODY=$'\'Lorem Ipsum<br><br>\''
$ echo $HTML_BODY 
'Lorem Ipsum<br><br>'
wdegeus added a commit to wdegeus/aws-env that referenced this issue Mar 13, 2018
4ndh4k added a commit to 4ndh4k/aws-env that referenced this issue Nov 17, 2022
wardviaene added a commit to in4it/aws-env that referenced this issue Feb 9, 2023
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

No branches or pull requests

1 participant