From b0dbbf4b5a3c4f672595490841027ee6cab6a6e5 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Thu, 7 Sep 2023 17:23:17 +0100 Subject: [PATCH] only numbers and letters in session key docker --- docker/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/startup.sh b/docker/startup.sh index 4d29b877..f3a30164 100644 --- a/docker/startup.sh +++ b/docker/startup.sh @@ -22,7 +22,7 @@ else sed -i "s/\"WebRTC\": false/\"WebRTC\": $WEBRTC/" meshcentral-data/"${CONFIG_FILE}" sed -i "s/\"AllowFraming\": false/\"AllowFraming\": $IFRAME/" meshcentral-data/"${CONFIG_FILE}" if [ -z "$SESSION_KEY" ]; then - SESSION_KEY="$(cat /dev/urandom | tr -dc 'A-Za-z0-9!#$%&()*+,-./:;<=>?@[\]^_`{|}~' | fold -w 32 | head -n 1)" + SESSION_KEY="$(cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w 48 | head -n 1)" fi sed -i "s/\"_sessionKey\": \"MyReallySecretPassword1\"/\"sessionKey\": \"$SESSION_KEY\"/" meshcentral-data/"${CONFIG_FILE}" if [ "$REVERSE_PROXY" != "false" ]; then