Merge pull request #1934 from Sir3lit/uuidfix

Fixed UUID on node creation
This commit is contained in:
Dane Everitt 2020-04-17 09:41:00 -07:00 committed by GitHub
commit b16d152574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
namespace Pterodactyl\Services\Nodes;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;
use Pterodactyl\Models\Node;
use Illuminate\Encryption\Encrypter;
@ -41,6 +42,7 @@ class NodeCreationService
*/
public function handle(array $data)
{
$data['uuid'] = Uuid::uuid4()->toString();
$data['daemon_token'] = $this->encrypter->encrypt(Str::random(Node::DAEMON_TOKEN_LENGTH));
$data['daemon_token_id'] = Str::random(Node::DAEMON_TOKEN_ID_LENGTH);