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

[Bug]: Secrets containing "$" are not working correctly #1821

Closed
igor-topolski opened this issue Mar 8, 2024 · 4 comments · Fixed by #1861
Closed

[Bug]: Secrets containing "$" are not working correctly #1821

igor-topolski opened this issue Mar 8, 2024 · 4 comments · Fixed by #1861

Comments

@igor-topolski
Copy link

igor-topolski commented Mar 8, 2024

Description

I added a secret to environmental variables in my project; let's say it was
MY_SUPER_SECRET=something$1234

The secret would get corrupted and omit anything past the dollar sign symbol. I tried various escaping techniques (quotations, backslashes, etc.) but with no luck. I ended up changing the secret so it doesn't contain the $ character; however, it is often not an option (some secrets always or often have it).

EDIT: I use Cloud version

Minimal Reproduction (if possible, example repository)

  1. Create a project (I used a pre-built Dockerfile hosted on a private ghcr.io)
  2. Add a secret to Environment Variables containing $.
  3. Try to consume secret in your application or:
    3.1. docker exec -it /container /bin/bash (or any available shell) into your container
    3.2. Run echo SECRET_NAME

In my case, the secret would get truncated at $.

Exception or Error

The secret gets truncated at $ symbol.

Version

v4.0.0-beta.236

@andrasbacsai
Copy link
Member

I tried to replicate it, but I could not.

image
image

Can you please show me the same screens for your app?

@igor-topolski
Copy link
Author

Hmmm, that's interesting the secret in my case had @ a few characters and then $.

Something along the lines of abcde@fghijk$123. Let me try and replicate it once again.

@igor-topolski
Copy link
Author

igor-topolski commented Mar 13, 2024

I managed to reproduce it. Interestingly, not all secrets cause that behaviour.

I think it happens when there are:

  • at symbol @
  • dollar sign $
  • other characters k

In that case everything past @ gets truncated

image
image

image
image

@andrasbacsai
Copy link
Member

This will be fixed in the upcoming version.

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