forked from Alex/Pterodactyl-Panel
Prevent catastrophic boot failure in wings when a server egg has bad data; closes #3055
This commit is contained in:
parent
19279644df
commit
1943c7a98b
@ -98,6 +98,16 @@ class EggConfigurationService
|
||||
// Normalize the output of the configuration for the new Wings Daemon to more
|
||||
// easily ingest, as well as make things more flexible down the road.
|
||||
foreach ($configs as $file => $data) {
|
||||
// Try to head off any errors relating to parsing a set of configuration files
|
||||
// or other JSON data for the egg. This should probably be blocked at the time
|
||||
// of egg creation/update, but it isn't so this check will at least prevent a
|
||||
// 500 error which would crash the entire Wings boot process.
|
||||
//
|
||||
// @see https://github.com/pterodactyl/panel/issues/3055
|
||||
if (!is_object($data) || !isset($data->find)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$append = array_merge((array) $data, ['file' => $file, 'replace' => []]);
|
||||
|
||||
foreach ($this->iterate($data->find, $structure) as $find => $replace) {
|
||||
|
Loading…
Reference in New Issue
Block a user