Daemon secret is not a thing anymore

This commit is contained in:
Dane Everitt 2019-12-15 18:31:15 -08:00
parent 1aacc48f0c
commit 2cabfeec15
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 0 additions and 32 deletions

View File

@ -4,7 +4,6 @@ namespace Pterodactyl\Services\Servers;
use Ramsey\Uuid\Uuid; use Ramsey\Uuid\Uuid;
use Illuminate\Support\Arr; use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Pterodactyl\Models\Node; use Pterodactyl\Models\Node;
use Pterodactyl\Models\User; use Pterodactyl\Models\User;
use Pterodactyl\Models\Server; use Pterodactyl\Models\Server;
@ -228,7 +227,6 @@ class ServerCreationService
'egg_id' => Arr::get($data, 'egg_id'), 'egg_id' => Arr::get($data, 'egg_id'),
'pack_id' => empty($data['pack_id']) ? null : $data['pack_id'], 'pack_id' => empty($data['pack_id']) ? null : $data['pack_id'],
'startup' => Arr::get($data, 'startup'), 'startup' => Arr::get($data, 'startup'),
'daemonSecret' => Str::random(Node::DAEMON_SECRET_LENGTH),
'image' => Arr::get($data, 'image'), 'image' => Arr::get($data, 'image'),
'database_limit' => Arr::get($data, 'database_limit'), 'database_limit' => Arr::get($data, 'database_limit'),
'allocation_limit' => Arr::get($data, 'allocation_limit'), 'allocation_limit' => Arr::get($data, 'allocation_limit'),

View File

@ -32,36 +32,6 @@ trait JavascriptInjection
return $this; return $this;
} }
/**
* Injects server javascript into the page to be used by other services.
*
* @param array $args
* @param bool $overwrite
* @return array
*/
public function injectJavascript($args = [], $overwrite = false)
{
$request = $this->request ?? app()->make(Request::class);
$server = $request->attributes->get('server');
$token = $request->attributes->get('server_token');
$response = array_merge_recursive([
'server' => [
'uuid' => $server->uuid,
'uuidShort' => $server->uuidShort,
'daemonSecret' => $token,
],
'server_token' => $token,
'node' => [
'fqdn' => $server->node->fqdn,
'scheme' => $server->node->scheme,
'daemonListen' => $server->node->daemonListen,
],
], $args);
return Javascript::put($overwrite ? $args : $response);
}
/** /**
* Injects the exact array passed in, nothing more. * Injects the exact array passed in, nothing more.
* *