Commit ff5f9dec authored by Paul Graydon's avatar Paul Graydon

software/ors-amarisoft: Fix potential buildout code injection

See merge request nexedi/slapos!1650
parent b742fb8e
Pipeline #37322 passed with stage
in 0 seconds
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = 711d90973a5cfb2f61d3a3a53c07c64c
md5sum = f1b9ae02222c020c89d1a3fa75475826
[template-ors]
filename = instance-ors.cfg
......@@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 7e7a0443f42c033285eb6871f6083ffb
md5sum = 2294f837e8dc6666d7aabfa186ebd175
[template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
......
......@@ -16,6 +16,7 @@
{%- for k,v in enb_defaults|dictsort %}
{%- do slapparameter_dict.setdefault(k, v) %}
{%- endfor %}
{%- set B = xbuildout.encode %}
[buildout]
......@@ -178,7 +179,7 @@ logfile = ${xamari-xlog-script:logfile}
forward-host = {{ slapparameter_dict.xlog_fluentbit_forward_host }}
forward-port = {{ slapparameter_dict.xlog_fluentbit_forward_port }}
forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }}
forward-self-hostname = {{ comp_id['comp-id'] }}
forward-self-hostname = {{ B(comp_id['comp-id']) }}
inline =
[SERVICE]
flush 5
......
......@@ -127,7 +127,7 @@ title = $${slap-configuration:root-instance-title}
init =
import socket
options['hostname'] = socket.gethostname()
comp_id = '__'.join(options[x] for x in ('hostname', 'computer', 'title'))
comp_id = '_'.join(options[x] for x in ('hostname', 'computer', 'title'))
options['comp-id'] = comp_id
[switch-softwaretype]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment