Fixed handling of usernames with spaces in WHITE_LIST_USERS

Fixes #116
This commit is contained in:
Geoff Bourne committed 2020-12-06 21:34:14 -06:00
1 parent 5bc02e1afc
commit 6a8f4aa002
1 file changed
+1 -1
+1 -1
View File
@@ -117,7 +117,7 @@ fi
if [ -n "$WHITE_LIST_USERS" ]; then if [ -n "$WHITE_LIST_USERS" ]; then
echo "Setting whitelist" echo "Setting whitelist"
rm -rf whitelist.json rm -rf whitelist.json
echo $WHITE_LIST_USERS | awk -v RS=, 'BEGIN{print "["}; {print "{ \"name\": \"" $1 "\" },"}; END{print "]"}' > whitelist.json echo "$WHITE_LIST_USERS" | jq -R 'split(",") | map({"name": .})' > whitelist.json
# flag whitelist to true so the server properties process correctly # flag whitelist to true so the server properties process correctly
export WHITE_LIST=true export WHITE_LIST=true
fi fi