ubergeek77 / Lemmy-Easy-Deploy

Deploy Lemmy the easy way!
MIT License
133 stars 14 forks source link

Broken passwords in /live config when using passwords with certain special characters #52

Closed uollano closed 1 year ago

uollano commented 1 year ago

Broken passwords resulting in /live config files when config.env contains passwords with certain special characters. In my case the SMTP password contained a ">" character, and the resulting lemmy.hjson had a broken password (unrelated text appearing at the ">" mark). This password is autogenerated by my SMTP provider so I can't manually change it to something that does not break.

I guess this specific character is not escaped when parsing config.env and generating the live files.

I have since edited lemmy.hjson manually so I can't post the broken file here, since the issue seems simple enough I'd rather not break my Lemmy instance, even temporarily, by re-deploying.

ubergeek77 commented 1 year ago

Try putting the password in single quotes instead of double quotes

uollano commented 1 year ago

Tried re-deploying Lemmy putting the password in single quotes in config.env but I got the same result. However, I can provide more detail: the character that seems to be triggering the bug is &. This gets replaced with {{SMTP_PASSWORD}} in lemmy.hjson

ubergeek77 commented 1 year ago

Do you see any specific errors when deploying? Any errors in the logs?

docker compose -p lemmy-easy-deploy logs Lemmy -f

Sounds like lemmy.hjson may need to use single quotes as well.

As a temporary workaround, you can try copying lemmy.hjson to:

./custom/lemmy.hjson.template

(You will need to create the custom folder)

Then you can try replacing the double quotes there with single quotes, then redeploying.

If it still doesn't work, and there are no errors in this script, and the generated file looks fine, then you may need to file a bug with the Lemmy team. But I think this last workaround should work.