The discussion revolves around a DISCOURSE_SMTP_PASSWORD change failure during Discourse installation on AWS EC2. Pravi7434 encountered the issue with a password containing special characters (e.g., /, +, =) and resolved it by using a password without such characters. zogstrip and MakaryGo pointed out that special characters in passwords require quotes in the app.yml file to prevent parsing issues. pfaffman confirmed this is a limitation in discourse-setup, where passwords with certain delimiters (like slashes) are not properly escaped during sed replacement, leading to errors. They acknowledged the issue and added it to their TODO list, suggesting improvements such as detecting problematic characters or enforcing quotes in the standalone.yml template. codinghorror supported the idea of implementing the simplest fix.
I got above mentioned error while installing discourse on aws ec2. The problem was with my SES smtp password ( AmQ/22sNDN2Bg5vS+zH3IDfy+lfmF3OgGg/CnsAZMg90 ). Later I changed the password to one without any special characters and it worked. I am not sure its a bug or discourse wont encourage password with special characters. I thought I have to inform.
@zogstrip No, I didn’t put any quotes around the password.I simply copied and pasted the password into the app.yml. Actually this is not the first time I am installing discourse. This error happens to me today, when I am trying to have a fresh discourse install.
And that’s probably the cause.If you have some special characters, you should encase it in the quotes, so that Discourse knows where it begins and ends.
It’s a bug/limitation in ./discourse-setup. It doesn’t properly escape passwords before asking sed to do the replacement.
One solution would be to check the password for a set of delimiters before doing the replacement and then choose the replacement delimiter accordingly.
Another would be to check for a slash in the password and punt, then tell them to change the password or edit app.yml by hand.
I’ll add this to my TODO list of improvements to discourse-setup.
Oh. I was wrong.
I’ll add putting quotes around the password in samples/standalone.yml to my list as well. I’ve got a couple other yml updates I have been wanting to do as well.