single string parameter containing space interpreted as 2 separate ones
gekigek99 opened this issue · 4 comments
Current Behavior
./msh_server.bin -port 10039 -d 3 -file 'ser ver.jar' -allowkill 30 -timeout 120 -SuspendRefresh 30 -wlimport -SuspendAllow -msparam "-Xms128M -Xmx4096M"
-port|10039|-d|3|-file|'ser|ver.jar'|-allowkill|30|-timeout|120|-SuspendRefresh|30|-wlimport|-SuspendAllow|-msparam|"-Xms128M|-Xmx4096M"|
the parameter 'ser ver.jar'
and "-Xms128M -Xmx4096M"
are split into 2 parameters because are separated by a space (ignoring the "
and '
)
Expected Behavior
./msh_server.bin -port 10039 -d 3 -file 'ser ver.jar' -allowkill 30 -timeout 120 -SuspendRefresh 30 -wlimport -SuspendAllow -msparam "-Xms128M -Xmx4096M"
-port|10039|-d|3|-file|'ser ver.jar'|-allowkill|30|-timeout|120|-SuspendRefresh|30|-wlimport|-SuspendAllow|-msparam|"-Xms128M -Xmx4096M"|
Steps to Reproduce
- replace file contents of
msh_server.bin
with:
#!/bin/bash
for i; do
echo -n $i"|"
done
- start the server
- notice that
"
and'
are ignored and the parameter is splitted in half (by the space)
Panel Version
1.11.2
Wings Version
1.11.0
Games and/or Eggs Affected
Docker Image
ghcr.io/pterodactyl/yolks:java_17
Error Logs
-
Is there an existing issue for this?
- I have searched the existing issues before opening this issue.
- I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
- I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.
I am unable to replicate this no matter how many different ways I try to parse the variables in the entrypoint.
Using the image ghcr.io/pterodactyl/yolks:java_17
as-is with your debug egg and example bash file results in expected results:
-port|7778|-d|3|-file|server.jar|-allowkill|30|-timeout|120|-SuspendRefresh|30|-wlimport|-SuspendAllow|-msparam|"-Xms128M|-Xmx5000M"|
Complete startup:
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)
container@pterodactyl~ ./test.sh -port 7778 -d 3 -file server.jar -allowkill 30 -timeout 120 -SuspendRefresh 30 -wlimport -SuspendAllow -msparam "-Xms128M -Xmx5000M"
-port|7778|-d|3|-file|server.jar|-allowkill|30|-timeout|120|-SuspendRefresh|30|-wlimport|-SuspendAllow|-msparam|"-Xms128M|-Xmx5000M"|
container@pterodactyl~ Server marked as offline...
You reproduced it correctly for "-Xms128M -Xmx5000M"
which is printed as |"-Xms128M|-Xmx5000M"|
, meaning 2 different start parameters instead of the expected 1.
In my example I used "ser ver.jar"
(notice the space) while you used "server.jar"
which does not have a space character and won't demostrate the unexpected behaviour.
You reproduced it correctly for
"-Xms128M -Xmx5000M"
which is printed as|"-Xms128M|-Xmx5000M"|
, meaning 2 different start parameters instead of the expected 1.In my example I used
"ser ver.jar"
(notice the space) while you used"server.jar"
which does not have a space character and won't demostrate the unexpected behaviour.
My bad, seems I misunderstood the issue examples. Looks like there's field splitting somewhere in the parsing.
Looks like there's field splitting somewhere in the parsing.
But this shouldn't be caused by my example script.
Might be due to the egg?
Or is it a panel bug?