Validate special characters that may conflict with sed (#13674)

This commit is contained in:
Javier García
2023-08-09 19:43:51 +02:00
committed by GitHub
parent c9d907e3fe
commit 85fb7513db

View File

@@ -38,6 +38,11 @@ case "$1" in
if [ "$RET" = "false" ] ; then
echo "Application secret is mandatory"
fi
# Not allowed unix special characters in secret: /, \, ", ', `
if echo "$RET" | grep -q '[/\\\"\`]' ; then
echo "Application secret contains invalid characters: /, \\, \", ', \`"
exit 1
fi
APP_SECRET=$RET
PROSODY_HOST_CONFIG="/etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua"