peliprint/app/Http/Controllers/Admin/ExtensionsController.php
purple 46158e6079 Arguments parsed through shell are now checked by escapeshellarc($var).
Panel administrators will no longer have access to the shell. This includes the developer terminal turning into a Blueprint execute terminal. (something you'll probably never use anyways.)
2023-06-27 21:40:35 +02:00

39 lines
1.1 KiB
PHP

<?php
namespace Pterodactyl\Http\Controllers\Admin;
use Illuminate\View\View;
use Illuminate\View\Factory as ViewFactory;
use Pterodactyl\Http\Controllers\Controller;
use Pterodactyl\Services\Helpers\SoftwareVersionService;
use Pterodactyl\Services\Helpers\BlueprintVariableService;
class ExtensionsController extends Controller
{
/**
* ExtensionsController constructor.
*/
public function __construct(private SoftwareVersionService $version, private ViewFactory $view, private BlueprintVariableService $bp)
{
}
/**
* Return the admin index view.
*/
public function index(): View
{
// Onboarding check.
if(shell_exec("cd /var/www/pterodactyl;cat .blueprint/data/internal/db/onboarding") == "*blueprint*") {
$onboarding = true;
} else {
$onboarding = false;
}
return $this->view->make('admin.extensions', [
'version' => $this->version,
'bp' => $this->bp,
'root' => "/admin/extensions",
'onboarding' => $onboarding
]);
}
}