Discourse-setup generates malformed YAML if password contains ':'

During initial ./discourse-setup using 1475ee4554ba7895cf3410f6181bb96155c7b5b3 the DISCOURSE_SMTP_PASSWORD contained a full-colon character : which resulted in an error after pulling down the docker image:

(): mapping values are not allowed in this context at line 62 column 42 -e LANG=en_US.UTF-8
YAML syntax error. Please check your containers/*.yml config files.

That was the final two lines of output from the script. I fixed app.yaml by simply quoting the DISCOURSE_SMTP_PASSWORD value.

./discourse-setup should probably be properly quoting all of these yaml responses anyway.


Yes, excellent point! I was afraid to put this in the raw YAML file to avoid the implied “who’s on first” problem of whether double quotes are part of the password or not. This came up before and we discussed it, but decided to leave it as a comment.

But within discourse-setup adding double quotes around the DISCOURSE_SMTP_PASSWORD is a no-brainer and can be automated, so I’ve done that:

(I don’t think the other fields will typically contain any unusual characters and thus don’t benefit from this kind of protection like password field does.)