Ptero API keys are now encrypted.

This commit is contained in:
Ferks-FK 2023-02-02 15:14:44 +00:00 committed by IceToast
parent ca0fae7bdb
commit 1086dd85a4

View file

@ -8,8 +8,8 @@ class CreatePterodactylSettings extends SettingsMigration
public function up(): void
{
// Get the user-set configuration values from the old table.
$this->migrator->add('pterodactyl.admin_token', ($this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:TOKEN') != null) ?: env('PTERODACTYL_TOKEN', ''));
$this->migrator->add('pterodactyl.user_token', ($this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN') != null) ?: '');
$this->migrator->addEncrypted('pterodactyl.admin_token', ($this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:TOKEN') != null) ?: env('PTERODACTYL_TOKEN', ''));
$this->migrator->addEncrypted('pterodactyl.user_token', ($this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN') != null) ?: '');
$this->migrator->add('pterodactyl.panel_url', ($this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:URL') != null) ?: env('PTERODACTYL_URL', ''));
$this->migrator->add('pterodactyl.per_page_limit', ($this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT') != null) ?: 200);
}