# Discourse\_docker: discourse-setup makes sed parse SMTP password

**URL:** <https://meta.discourse.org/t/discourse-docker-discourse-setup-makes-sed-parse-smtp-password/73390>\
**Category:** Bug\
**Created:** [3 Novembre 2017, 9:06pm UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-makes-sed-parse-smtp-password/73390 "2017-11-03T21:06:57Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [27 Agosto 2018, 9:03pm UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-makes-sed-parse-smtp-password/73390/8 "2018-08-27T21:03:10Z")

</div>

At least mostly. Here’s what read\_config looks like now. The `sed` replacement mostly fixes up stuff that needs to be escaped.

```bash
read_config() {
  config_line=`egrep "^ #?$1:" $web_file`
  read_config_result=`echo $config_line | awk --field-separator=":" '{print $2}'`
  read_config_result=`echo $read_config_result | sed "s/^\([\"']\)\(.*\)\1\$/\2/g"`
}

```

I think it now works at least with characters likely to be in a password. I don’t think I’ve seen any complaints about wonky passwords breaking `discourse-setup` in a long while.

I don’t consider this much of a security issue, as it would require either the sysadmin of the Discourse server or the sysadmin of the mail server to be malicious.

---

_[View the full topic](https://meta.discourse.org/t/discourse-docker-discourse-setup-makes-sed-parse-smtp-password/73390)._
