Fix ALLOW_LIST_USERS parsing. (#613)

This commit is contained in:
Jonathan Stucklen authored and GitHub committed 2026-03-15 19:17:43 -05:00
1 parent 8ebb70e5c1
commit 238b6e8fd2
1 file changed
+3 -3
+3 -3
View File
@@ -362,9 +362,9 @@ if [[ -n "$ALLOW_LIST_USERS" || -n "$WHITE_LIST_USERS" ]]; then
if [[ "$allowListUsers" ]]; then if [[ "$allowListUsers" ]]; then
echo "Setting allow list" echo "Setting allow list"
if [[ "$allowListUsers" != *":"* ]]; then if [[ "$allowListUsers" != *":"* ]]; then
jq -c -n --arg users "$allowListUsers" '$users | split("[,\n]+") | map(select(length>0) | {"ignoresPlayerLimit":false,"name": .})' > "allowlist.json" jq -c -n --arg users "$allowListUsers" '$users | split("[,\\n]+"; "") | map(select(length>0) | {"ignoresPlayerLimit":false,"name": .})' > "allowlist.json"
else else
jq -c -n --arg users "$allowListUsers" '$users | split("[,\n]+") | map(select(length>0) | split(":") | {"ignoresPlayerLimit":false,"name": .[0], "xuid": .[1]})' > "allowlist.json" jq -c -n --arg users "$allowListUsers" '$users | split("[,\\n]+"; "") | map(select(length>0) | split(":") | {"ignoresPlayerLimit":false,"name": .[0], "xuid": .[1]})' > "allowlist.json"
fi fi
# activate server property to enable list usage # activate server property to enable list usage
ALLOW_LIST=true ALLOW_LIST=true
@@ -390,7 +390,7 @@ if [[ -n "$VARIABLES" ]]; then
# Note: Values should not contain unescaped commas or colons # Note: Values should not contain unescaped commas or colons
jq -n --arg vars "$VARIABLES" ' jq -n --arg vars "$VARIABLES" '
$vars $vars
| split("[,\n]+") | split("[,\\n]+"; "")
| map( | map(
select(length>0) | select(length>0) |
split("=") as $kv | split("=") as $kv |