-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[Bug]: env var with $ parsing #3946
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
Comments
There is indeed a workaround, if you edit the docker-compose file. For instance, if the password hash generation utility generated the following:
Note: I single quoted the whole line AND doubled all the $ signs from the original hash. The However, the variable will show up akwardly in the environment variables GUI. You can indeed remove it and even restart the container, password will still work. It does reappear every time I save the dockerfile though. Ideally, I'd like to be able to enter the Related issue: #4321 |
@axelbdt It works, thanks. |
just an extra note for those who use @axelbdt solution, if you have slash '/' in your password hash, you will get below error. this is caused by variable showing in env var as mentioned. what you need to do is keep generating the password hash until you get password hash that doesn't contain slash like below |
can confirm this workaround works for me too. thanks @HachiroSan |
Error Message and Logs
Hello
Thanks for building Coolify.
I've tried to install https://github.com/wg-easy/wg-easy through a docker-compose.
To secure the installation it requires a PASSWORD_HASH which is a bcrypt hash so for instance:
However I never been able to set that environment variable properly, it seems there is a bug.
For instance if you:
Escape special characters in labels?
This
will be translated to
There is this extra line:
$2a$$12$$mSNGEiOT7urQP/Xs10XzPurl5cmVj6tavHRZQUK0jIFXRWFBGmssu: null
I tried also without doubling the $ sign and tick the box but same issue
You can remove the created var from environment variable but it seems there is something that recreate if you play with different save/update.
I also tried to set variable that way
PASSWORD_HASH: "${WIREGUARD_PASSWORD_HASH}"
However when I'm getting into the container through the terminal the value is never the hash injected through environment variable (truncated or mutated).
Steps to Reproduce
$2a$12$mSNGEiOT7urQP/Xs10XzPurl5cmVj6tavHRZQUK0jIFXRWFBGmssu
Example Repository URL
No response
Coolify Version
v4.0.0-beta.360
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04.1 LTS
Additional Information
No response
The text was updated successfully, but these errors were encountered: