Panel: Environment Variables are all parsed as strings

Created on 15 May 2020  路  3Comments  路  Source: pterodactyl/panel

Background (please complete the following information):

  • Panel or Daemon: Daemon
  • Version of Panel/Daemon: 1.0.0.beta.4
  • Server's OS: All
  • Your Computer's OS & Browser:

Describe the bug
The daemon is parsing all values in the environment as strings and wraps them with double-quote marks ("). This breaks the startup on servers where the variable is a port number as it gets parsed as a string and not a number value.

To Reproduce
Steps to reproduce the behavior:
Install a Rust server.
The RCON_PORT variable will be wrapped like "28016" which breaks the wrapper and potentially other servers.

Expected behavior
don't wrap all variables in double-quote marks

Potential fixes:

  1. Use [string]interface{} (possible to break in other creative ways)
  2. Wrap strings specifically in the panel before it's sent to the daemon
bug

Most helpful comment

Of course we could just keep it in parity with the node daemon. Would keep it in line with what is already there.

All 3 comments

Of course we could just keep it in parity with the node daemon. Would keep it in line with what is already there.

Well yes, that is the goal. This is just an unexpected bug because Node and Go are wildly different languages. :)

granted they are hugely different

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zKoz210 picture zKoz210  路  4Comments

vipesz picture vipesz  路  4Comments

schrej picture schrej  路  3Comments

WeatherSquad picture WeatherSquad  路  3Comments

TRYTIG picture TRYTIG  路  3Comments