possible bug - environment variable value being cut
See original GitHub issueI have an ENV variable, say RANDOM_HASH
in my .env
file
.env
RANDOM_HASH="XXXXX#XXXXX%9^XX$4$FYNHtpPs6uc"
and on serverless.yml
custom:
dotenv:
include:
- RANDOM_HASH
when i deploy it, what reaches my lambda function only is XXXXX#XXXXX%9^XX
Somehow, it has been cut in the first $
same thing is found on the cloudformation-template-update-stack.json
file
"Environment": {
"Variables": {
"RANDOM_HASH": "XXXXX#XXXXX%9^XX"
}
}
so i suspect that the library somehow accidentally split the content. Do you have some work around in mind, so that I can upload the same env variable value?
Thanks in advance!
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Environment variable string getting chopped off because of ...
I need to use the varibale in a script. When I print the variable through the script, The string gets chopped off after...
Read more >Buffer Overflow via Environment Variables - OWASP Foundation
The environment variable exposed to the user is vulnerable to a buffer overflow. The vulnerable environment variable uses untrusted data. Tainted data used...
Read more >5 Bug-Prone Points About Variables in Linux Bash Scripting
When we declare a variable in Bash, there are 3 options about the usage of quotation marks: No quotation marks at all; Use...
Read more >Environment variables in .tf files · Issue #62 · hashicorp/terraform
I browsed all over the documentation and couldn't find a way to interpolate environment variables in a configuration file. Is this possible?
Read more >23.2 env : Run a command in a modified environment - GNU.org
Setting a variable to an empty value is different from unsetting it. ... Run foo with a reduced environment, preserving only the original...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this should really be mentioned in the docs. Not everyone is aware of this, and they might bang their head against the wall while figuring this out 😉
Hi @triwats, yes, I’m just using a backslash
\
to secape a$
, not using any kind of encapsulation around it.