only numbers and letters in session key docker

Simon Smith committed Sep 7, 2023 at 17:23 UTC b0dbbf4b5a3c4f672595490841027ee6cab6a6e5
1 file changed +1 -1
docker/startup.sh
+1 -1
@@ -22,7 +22,7 @@ else
22 sed -i "s/\"WebRTC\": false/\"WebRTC\": $WEBRTC/" meshcentral-data/"${CONFIG_FILE}"
23 sed -i "s/\"AllowFraming\": false/\"AllowFraming\": $IFRAME/" meshcentral-data/"${CONFIG_FILE}"
24 if [ -z "$SESSION_KEY" ]; then
25 - SESSION_KEY="$(cat /dev/urandom | tr -dc 'A-Za-z0-9!#$%&()*+,-./:;<=>?@[\]^_`{|}~' | fold -w 32 | head -n 1)"
25 + SESSION_KEY="$(cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w 48 | head -n 1)"
26 fi
27 sed -i "s/\"_sessionKey\": \"MyReallySecretPassword1\"/\"sessionKey\": \"$SESSION_KEY\"/" meshcentral-data/"${CONFIG_FILE}"
28 if [ "$REVERSE_PROXY" != "false" ]; then