From ba9d02ecb3237e16423262151629fb670ac5270d Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Sun, 29 Nov 2015 19:06:10 +0530 Subject: [PATCH] escape `&` characters in `set_postgresql_param` --- runtime/functions | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/functions b/runtime/functions index d2f1d86..c47815f 100755 --- a/runtime/functions +++ b/runtime/functions @@ -65,6 +65,7 @@ set_postgresql_param() { local current=$(exec_as_postgres sed -n -e "s/^\("${key}" = '\)\([^ ']*\)\(.*\)$/\2/p" ${PG_CONF}) if [[ "${current}" != "${value}" ]]; then echo "‣ Setting postgresql.conf parameter: ${key} = '${value}'" + value="$(echo "${value}" | sed 's|[&]|\\&|g')" exec_as_postgres sed -i "s|^[#]*[ ]*${key} = .*|${key} = '${value}'|" ${PG_CONF} fi fi