Skip to content

Commit 1ae245a

Browse files
committed
Merge remote-tracking branch 'pterodactyl/release/v0.7.10' into feature/add-dockerfile
2 parents b370b2c + d5f166d commit 1ae245a

File tree

116 files changed

+7039
-1933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+7039
-1933
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ APP_CLEAR_TASKLOG=720
77
APP_DELETE_MINUTES=10
88
APP_ENVIRONMENT_ONLY=true
99
LOG_CHANNEL=daily
10+
APP_LOCALE=en
1011

1112
DB_HOST=127.0.0.1
1213
DB_PORT=3306
@@ -27,4 +28,4 @@ MAIL_FROM=no-reply@example.com
2728

2829
QUEUE_HIGH=high
2930
QUEUE_STANDARD=standard
30-
QUEUE_LOW=low
31+
QUEUE_LOW=low

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ misc
2828
.phpstorm.meta.php
2929
.php_cs.cache
3030

31+
coverage.xml
32+
3133
# Vagrant
3234
*.log

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ This file is a running track of new features and fixes to each version of the pa
33

44
This project follows [Semantic Versioning](http://semver.org) guidelines.
55

6+
## v0.7.10 (Derelict Dermodactylus)
7+
### Fixed
8+
* Scheduled tasks triggered manually no longer improperly change the `next_run_at` time and do not run twice in a row anymore.
9+
* Changing the maximum web-based file upload size for a node now properly validates and updates.
10+
* Changing configuration values for a node now correctly updates them on the daemon on the first request, rather than requiring a second request to set them.
11+
12+
### Changed
13+
* Egg and server variable values are no longer limited to 191 characters. Turns out some games require a large number of characters in these fields.
14+
15+
### Added
16+
* Users can now select their preferred language in their account settings.
17+
618
## v0.7.9 (Derelict Dermodactylus)
719
### Fixed
820
* Fixes a two-factor authentication bypass present in the password reset process for an account.

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
[![Logo Image](https://cdn.pterodactyl.io/logos/Banner%20Logo%20Black@2x.png)](https://pterodactyl.io)
22

3-
[![Build Status](https://travis-ci.org/pterodactyl/panel.svg?branch=develop)](https://travis-ci.org/pterodactyl/panel) [![StyleCI](https://styleci.io/repos/47508644/shield?branch=develop)](https://styleci.io/repos/47508644) [![codecov](https://codecov.io/gh/pterodactyl/panel/branch/develop/graph/badge.svg)](https://codecov.io/gh/Pterodactyl/Panel)
3+
[![Build status](https://img.shields.io/travis/pterodactyl/panel/develop.svg?style=flat-square)](https://travis-ci.org/pterodactyl/panel)
4+
[![StyleCI](https://styleci.io/repos/47508644/shield?branch=develop)](https://styleci.io/repos/47508644)
5+
[![Codecov](https://img.shields.io/codecov/c/github/pterodactyl/panel/develop.svg?style=flat-square)](https://codecov.io/gh/Pterodactyl/Panel)
6+
[![Discord](https://img.shields.io/discord/122900397965705216.svg?style=flat-square&label=Discord)](https://pterodactyl.io/discord)
47

58
# Pterodactyl Panel
9+
610
Pterodactyl is the open-source game server management panel built with PHP7, Nodejs, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to administrators and users.
711
What more are you waiting for? Make game servers a first class citizen on your platform today.
812

913
![Image](https://cdn.pterodactyl.io/site-assets/mockup-macbook-grey.png)
1014

1115
## Support & Documentation
12-
Support for using Pterodactyl can be found on our [Documentation Website](https://docs.pterodactyl.io), [Guides Website](https://guides.pterodactyl.io), or via our [Discord Chat](https://discord.gg/QRDZvVm).
16+
Support for using Pterodactyl can be found on our [Documentation Website](https://pterodactyl.io/project/introduction.html), [Guides Website](https://guides.pterodactyl.io), or via our [Discord Chat](https://discord.gg/QRDZvVm).
1317

1418
### Supported Games
1519
We support a huge variety of games by utilizing Docker containers to isolate each instance, giving you the power to host your games across the world without having to bloat each physical machine with additional dependencies.

app/Console/Commands/Schedule/ProcessRunnableCommand.php

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@
99

1010
namespace Pterodactyl\Console\Commands\Schedule;
1111

12-
use Carbon\Carbon;
12+
use Cake\Chronos\Chronos;
1313
use Illuminate\Console\Command;
1414
use Illuminate\Support\Collection;
1515
use Pterodactyl\Services\Schedules\ProcessScheduleService;
1616
use Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface;
1717

1818
class ProcessRunnableCommand extends Command
1919
{
20-
/**
21-
* @var \Carbon\Carbon
22-
*/
23-
protected $carbon;
24-
2520
/**
2621
* @var string
2722
*/
@@ -45,31 +40,28 @@ class ProcessRunnableCommand extends Command
4540
/**
4641
* ProcessRunnableCommand constructor.
4742
*
48-
* @param \Carbon\Carbon $carbon
4943
* @param \Pterodactyl\Services\Schedules\ProcessScheduleService $processScheduleService
5044
* @param \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface $repository
5145
*/
52-
public function __construct(
53-
Carbon $carbon,
54-
ProcessScheduleService $processScheduleService,
55-
ScheduleRepositoryInterface $repository
56-
) {
46+
public function __construct(ProcessScheduleService $processScheduleService, ScheduleRepositoryInterface $repository)
47+
{
5748
parent::__construct();
5849

59-
$this->carbon = $carbon;
6050
$this->processScheduleService = $processScheduleService;
6151
$this->repository = $repository;
6252
}
6353

6454
/**
6555
* Handle command execution.
66-
*
67-
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
68-
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
6956
*/
7057
public function handle()
7158
{
72-
$schedules = $this->repository->getSchedulesToProcess($this->carbon->now()->toAtomString());
59+
$schedules = $this->repository->getSchedulesToProcess(Chronos::now()->toAtomString());
60+
if ($schedules->count() < 1) {
61+
$this->line('There are no scheduled tasks for servers that need to be run.');
62+
63+
return;
64+
}
7365

7466
$bar = $this->output->createProgressBar(count($schedules));
7567
$schedules->each(function ($schedule) use ($bar) {

app/Http/Controllers/Api/Application/Locations/LocationController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
1212
use Pterodactyl\Transformers\Api\Application\LocationTransformer;
1313
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
14+
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationRequest;
1415
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationsRequest;
1516
use Pterodactyl\Http\Requests\Api\Application\Locations\DeleteLocationRequest;
1617
use Pterodactyl\Http\Requests\Api\Application\Locations\UpdateLocationRequest;
@@ -77,7 +78,7 @@ public function index(GetLocationsRequest $request): array
7778
/**
7879
* Return a single location.
7980
*
80-
* @param \Pterodactyl\Http\Controllers\Api\Application\Locations\GetLocationRequest $request
81+
* @param \Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationRequest $request
8182
* @return array
8283
*/
8384
public function view(GetLocationRequest $request): array

app/Http/Controllers/Api/Application/Nodes/NodeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function store(StoreNodeRequest $request): JsonResponse
124124
*/
125125
public function update(UpdateNodeRequest $request): array
126126
{
127-
$node = $this->updateService->returnUpdatedModel()->handle(
127+
$node = $this->updateService->handle(
128128
$request->getModel(Node::class), $request->validated()
129129
);
130130

app/Http/Controllers/Base/AccountController.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
use Illuminate\Contracts\Session\Session;
99
use Pterodactyl\Http\Controllers\Controller;
1010
use Pterodactyl\Services\Users\UserUpdateService;
11+
use Pterodactyl\Traits\Helpers\AvailableLanguages;
1112
use Pterodactyl\Http\Requests\Base\AccountDataFormRequest;
1213

1314
class AccountController extends Controller
1415
{
16+
use AvailableLanguages;
17+
1518
/**
1619
* @var \Prologue\Alerts\AlertsMessageBag
1720
*/
@@ -48,7 +51,9 @@ public function __construct(AlertsMessageBag $alert, AuthManager $authManager, U
4851
*/
4952
public function index()
5053
{
51-
return view('base.account');
54+
return view('base.account', [
55+
'languages' => $this->getAvailableLanguages(true),
56+
]);
5257
}
5358

5459
/**
@@ -70,7 +75,7 @@ public function update(AccountDataFormRequest $request)
7075
if ($request->input('do_action') === 'email') {
7176
$data = ['email' => $request->input('new_email')];
7277
} elseif ($request->input('do_action') === 'identity') {
73-
$data = $request->only(['name_first', 'name_last', 'username']);
78+
$data = $request->only(['name_first', 'name_last', 'username', 'language']);
7479
} else {
7580
$data = [];
7681
}

app/Http/Controllers/Server/Tasks/ActionController.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Pterodactyl\Http\Controllers\Server\Tasks;
44

5-
use Carbon\Carbon;
65
use Illuminate\Http\Request;
76
use Illuminate\Http\Response;
87
use Pterodactyl\Http\Controllers\Controller;
@@ -11,12 +10,22 @@
1110

1211
class ActionController extends Controller
1312
{
13+
/**
14+
* @var \Pterodactyl\Services\Schedules\ProcessScheduleService
15+
*/
1416
private $processScheduleService;
17+
1518
/**
1619
* @var \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface
1720
*/
1821
private $repository;
1922

23+
/**
24+
* ActionController constructor.
25+
*
26+
* @param \Pterodactyl\Services\Schedules\ProcessScheduleService $processScheduleService
27+
* @param \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface $repository
28+
*/
2029
public function __construct(ProcessScheduleService $processScheduleService, ScheduleRepositoryInterface $repository)
2130
{
2231
$this->processScheduleService = $processScheduleService;
@@ -61,7 +70,7 @@ public function trigger(Request $request): Response
6170
$server = $request->attributes->get('server');
6271
$this->authorize('toggle-schedule', $server);
6372

64-
$this->processScheduleService->setRunTimeOverride(Carbon::now())->handle(
73+
$this->processScheduleService->handle(
6574
$request->attributes->get('schedule')
6675
);
6776

app/Http/Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Illuminate\Foundation\Http\Kernel as HttpKernel;
1818
use Pterodactyl\Http\Middleware\Api\AuthenticateKey;
1919
use Illuminate\Routing\Middleware\SubstituteBindings;
20-
use Pterodactyl\Http\Middleware\AccessingValidServer;
2120
use Pterodactyl\Http\Middleware\Api\SetSessionDriver;
2221
use Illuminate\Session\Middleware\AuthenticateSession;
2322
use Illuminate\View\Middleware\ShareErrorsFromSession;
@@ -28,6 +27,7 @@
2827
use Pterodactyl\Http\Middleware\Api\ApiSubstituteBindings;
2928
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
3029
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
30+
use Pterodactyl\Http\Middleware\Server\AccessingValidServer;
3131
use Pterodactyl\Http\Middleware\Server\AuthenticateAsSubuser;
3232
use Pterodactyl\Http\Middleware\Api\Daemon\DaemonAuthenticate;
3333
use Pterodactyl\Http\Middleware\Server\SubuserBelongsToServer;

0 commit comments

Comments
 (0)