Browse Source

haproxy: sanitize the PEM in the deploy script

Sanitize the PEM of the haproxy deploy script by removing the '\n', this
way it could be injected directly over the CLI.
pull/4581/head
William Lallemand 1 year ago
parent
commit
7aaf4432d4
  1. 2
      deploy/haproxy.sh

2
deploy/haproxy.sh

@ -147,7 +147,7 @@ haproxy_deploy() {
# Create a temporary PEM file # Create a temporary PEM file
_temppem="$(_mktemp)" _temppem="$(_mktemp)"
_debug _temppem "${_temppem}" _debug _temppem "${_temppem}"
cat "${_ccert}" "${_cca}" "${_ckey}" >"${_temppem}"
cat "${_ccert}" "${_cca}" "${_ckey}" | grep . >"${_temppem}"
_ret="$?" _ret="$?"
# Check that we could create the temporary file # Check that we could create the temporary file

Loading…
Cancel
Save