Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

email_mirror: Handle possible % char in IPv6 address.

Mateusz Mandera3096be258c76
diff --git a/puppet/zulip/templates/supervisor/email-mirror.conf.template.erb b/puppet/zulip/templates/supervisor/email-mirror.conf.template.erb
index c7f52f496e9..3ac2a39c033 100644
--- a/puppet/zulip/templates/supervisor/email-mirror.conf.template.erb
+++ b/puppet/zulip/templates/supervisor/email-mirror.conf.template.erb
@@ -1,5 +1,7 @@
[program:zulip-email-server]
-command=nice -n15 /home/zulip/deployments/current/manage.py email_server --user zulip --group zulip<% if @listen != '' %> --listen <%= @listen %><% end %>
+<%# supervisor expands the command as a format string, so percent signs
+ in the address (e.g. an IPv6 zone id) must be doubled. -%>
+command=nice -n15 /home/zulip/deployments/current/manage.py email_server --user zulip --group zulip<% if @listen != '' %> --listen <%= @listen.gsub('%', '%%') %><% end %>
environment=HTTP_proxy="<%= @proxy %>",HTTPS_proxy="<%= @proxy %>"
priority=350 ; the relative start priority (default 999)
autostart=true ; start at supervisord start (default: true)