pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.4k stars 1.57k forks source link

INI Parser does not allow duplicate keys in the same section #1873

Open TooAngel opened 4 years ago

TooAngel commented 4 years ago

Background (please complete the following information):

It seems that the INI parser of Configuration Files of eggs does not allow within a section multiples keys with the same name.

E.g. with the cuberite minecraft server, when using the egg https://github.com/parkervcp/eggs/blob/master/minecraft_java/cuberite/egg-cuberite.json and having multiple plugins like:

[Plugins]
Plugin=a
Plugin=b

The pterodactyl ini parser ends up with having only one Plugin configured

When using eggs config files should be untouched, except of the parts which should be replaced.

Side-note: IMHO I think it is not a good practice to have multiple keys with the same name, but a server management software should still not break such servers.

AdamLeyshon commented 4 years ago

This is also an issue for Unreal Engine based games.

Panel: 0.7.17 Daemon: pteronode: '0.6.13' Server: Ubuntu 20.04 LTS

Take this INI section for example:

[Core.System]
PurgeCacheDays=30
SavePath=../Save
CachePath=../Cache
CacheExt=.uxx
Paths=../System/*.u
Paths=../Maps/*.unr
Paths=../Textures/*.utx
Paths=../Sounds/*.uax
Paths=../Music/*.umx
Suppress=DevLoad
Suppress=DevSave
Suppress=DevNetTraffic
Suppress=DevGarbage
Suppress=DevKill
Suppress=DevReplace
Suppress=DevSound
Suppress=DevCompile
Suppress=DevBind
Suppress=DevBsp

After startup config parses it, it becomes:

[Core.System]
PurgeCacheDays=30
SavePath=../Save
CachePath=../Cache
CacheExt=.uxx
Paths=../Music/*.umx
Suppress=DevBsp

All duplicate keys in the same section were lost and the game server no longer boots.

AdamLeyshon commented 2 years ago

I will try and re-test the issue next weekend when I have some spare time to configure a new UT server