Default to sanitizing newlines in secrets
This commit is contained in:
parent
00db510002
commit
6bb5231d17
|
|
@ -7,7 +7,11 @@ if find /run/s6/container_environment/*"FILE__"* -maxdepth 1 > /dev/null 2>&1; t
|
|||
SECRETFILE=$(cat "${FILENAME}")
|
||||
if [[ -f ${SECRETFILE} ]]; then
|
||||
FILESTRIP=${FILENAME//FILE__/}
|
||||
if [[ ${SECRET_NO_SANITIZE,,} = "true" ]]; then
|
||||
cat "${SECRETFILE}" >"${FILESTRIP}"
|
||||
else
|
||||
tr -d '\n' < "${SECRETFILE}" >"${FILESTRIP}"
|
||||
fi
|
||||
echo "[env-init] ${FILESTRIP##*/} set from ${FILENAME##*/}"
|
||||
else
|
||||
echo "[env-init] cannot find secret in ${FILENAME##*/}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue