# 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 november 2017 om 21:06 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:** 1

<div class="post-metadata">

**Author:** ![tomreyn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomreyn/32/120428_2.png) [@tomreyn](https://meta.discourse.org/u/tomreyn)\
**Post date:** [3 november 2017 om 21:06 UTC](https://meta.discourse.org/t/discourse-docker-discourse-setup-makes-sed-parse-smtp-password/73390/1 "2017-11-03T21:06:57Z")

</div>

I previously posted this on the GitHub issue tracker which has now been removed (including my post), so I’m posting it here again.

discourse-setup uses sed to place the user provided SMTP password in the configuration file. The user input is used as a regular expression by sed (-e) there, while it is really just a plain text string.

This works as long as the password does not contain any characters which sed would interpret as an expression / command.

When it fails to work, the user may get to see a sed error message in the discourse-setup output, and installation may fail.

This is potentially a security issue, since sed might end up executing the input string (///e).

---

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