Daemon secret is not a thing anymore
This commit is contained in:
parent
1aacc48f0c
commit
2cabfeec15
2 changed files with 0 additions and 32 deletions
|
@ -4,7 +4,6 @@ namespace Pterodactyl\Services\Servers;
|
|||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
use Pterodactyl\Models\Node;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Models\Server;
|
||||
|
@ -228,7 +227,6 @@ class ServerCreationService
|
|||
'egg_id' => Arr::get($data, 'egg_id'),
|
||||
'pack_id' => empty($data['pack_id']) ? null : $data['pack_id'],
|
||||
'startup' => Arr::get($data, 'startup'),
|
||||
'daemonSecret' => Str::random(Node::DAEMON_SECRET_LENGTH),
|
||||
'image' => Arr::get($data, 'image'),
|
||||
'database_limit' => Arr::get($data, 'database_limit'),
|
||||
'allocation_limit' => Arr::get($data, 'allocation_limit'),
|
||||
|
|
|
@ -32,36 +32,6 @@ trait JavascriptInjection
|
|||
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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue