Skip to content

Commit ace2e06

Browse files
committed
Merge branch 'release/v0.7.12'
2 parents 75a222f + 5fc6ef1 commit ace2e06

Some content is hidden

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

65 files changed

+2327
-860
lines changed

.dev/docker/default_ssl.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ server {
1111
listen 443 ssl http2;
1212
server_name <domain>;
1313

14-
root /var/www/pterodactyl/public;
14+
root /app/public;
1515
index index.php;
1616

1717
access_log /var/log/nginx/pterodactyl.app-access.log;
@@ -49,7 +49,7 @@ server {
4949

5050
location ~ \.php$ {
5151
fastcgi_split_path_info ^(.+\.php)(/.+)$;
52-
fastcgi_pass unix:/run/php/pterodactyl.sock;
52+
fastcgi_pass unix:/var/run/php/php-fpm7.2.sock;
5353
fastcgi_index index.php;
5454
include fastcgi_params;
5555
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";

.dev/docker/entrypoint.sh

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,50 @@
33

44
cd /app
55

6+
mkdir -p /var/log/panel/logs/ /var/log/supervisord/ /var/log/nginx/ /var/log/php7/ \
7+
&& rmdir /app/storage/logs/ \
8+
&& chmod 777 /var/log/panel/logs/ \
9+
&& ln -s /var/log/panel/logs/ /app/storage/
10+
611
## check for .env file and generate app keys if missing
712
if [ -f /app/var/.env ]; then
8-
echo "external vars exist"
13+
echo "external vars exist."
914
rm /app/.env
1015

1116
ln -s /app/var/.env /app/
1217
else
13-
echo "external vars don't exist"
18+
echo "external vars don't exist."
1419
rm /app/.env
1520
touch /app/var/.env
1621

1722
## manually generate a key because key generate --force fails
18-
echo -e "Generating key"
23+
echo -e "Generating key."
1924
APP_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
2025
echo -e "Generated app key: $APP_KEY"
2126
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
2227

2328
ln -s /app/var/.env /app/
2429
fi
2530

31+
echo "Checking if https is required."
32+
if [ -f /etc/nginx/conf.d/default.conf ]; then
33+
echo "Using nginx config already in place."
34+
else
35+
echo "Checking if letsencrypt email is set."
36+
if [ -z $LE_EMAIL ]; then
37+
echo "No letsencrypt email is set Failing to http."
38+
cp .dev/docker/default.conf /etc/nginx/conf.d/default.conf
39+
40+
else
41+
echo "writing ssl config"
42+
cp .dev/docker/default_ssl.conf /etc/nginx/conf.d/default.conf
43+
echo "updating ssl config for domain"
44+
sed -i "s|<domain>|$(echo $APP_URL | sed 's~http[s]*://~~g')|g" /etc/nginx/conf.d/default.conf
45+
echo "generating certs"
46+
certbot certonly -d $(echo $APP_URL | sed 's~http[s]*://~~g') --standalone -m $LE_EMAIL --agree-tos -n
47+
fi
48+
fi
49+
2650
## check for DB up before starting the panel
2751
echo "Checking database status."
2852
until nc -z -v -w30 $DB_HOST 3306
@@ -34,13 +58,13 @@ do
3458
done
3559

3660
## make sure the db is set up
37-
echo -e "Migrating and Seeding DB"
61+
echo -e "Migrating and Seeding D.B"
3862
php artisan migrate --force
3963
php artisan db:seed --force
4064

4165
## start cronjobs for the queue
42-
echo -e "Starting cron jobs"
43-
crond
66+
echo -e "Starting cron jobs."
67+
crond -L /var/log/crond -l 5
4468

45-
echo -e "Starting supervisord"
69+
echo -e "Starting supervisord."
4670
exec "$@"

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@ 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.12 (Derelict Dermodactylus)
7+
### Fixed
8+
* Fixes an issue with the locations API endpoint referencing an invalid namespace.
9+
* Fixes the `store()` function on the locations API not working due to an incorrect return typehint.
10+
* Fixes daemon secrets not being able to be reset on a Node.
11+
* Fixes an issue where files were not editable due to missing URL encoding in the file manager.
12+
* Fixed checking of language changes
13+
* Fixed Spigot egg not building versions other than `latest`.
14+
* Fixed the Forge egg install script.
15+
* Fixes a bug that would ignore the `skip_scripts` setting when creating or editing a server.
16+
17+
### Updated
18+
* Upgraded core to use Laravel `5.7.14`.
19+
* Updated Simplified Chinese translation pack.
20+
21+
### Added
22+
* Added support for opening and editing Python files through the web editor.
23+
* Adds Russian translation.
24+
625
## v0.7.11 (Derelict Dermodactylus)
726
### Fixed
827
* Fixes an issue with certain systems not handling an API folder that was named `API` but referenced as `Api` in the namespace.

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ RUN cp .env.example .env \
1515
RUN cp .dev/docker/default.conf /etc/nginx/conf.d/default.conf \
1616
&& cp .dev/docker/www.conf /etc/php7/php-fpm.d/www.conf \
1717
&& cat .dev/docker/supervisord.conf > /etc/supervisord.conf \
18-
&& echo "* * * * * /usr/bin/php /app/pterodactyl/artisan schedule:run >> /dev/null 2>&1" >> /var/spool/cron/crontabs/root \
19-
&& mkdir -p /var/run/php /var/run/nginx \
20-
&& mkdir -p /var/log/supervisord/
18+
&& echo "* * * * * /usr/bin/php /app/artisan schedule:run >> /dev/null 2>&1" >> /var/spool/cron/crontabs/root \
19+
&& sed -i s/ssl_session_cache/#ssl_session_cache/g /etc/nginx/nginx.conf \
20+
&& mkdir -p /var/run/php /var/run/nginx
2121

2222
EXPOSE 80 443
2323

app/Console/Commands/Environment/AppSettingsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function handle()
132132
);
133133

134134
$selected = $this->config->get('queue.default', 'redis');
135-
$this->variables['QUEUE_DRIVER'] = $this->option('queue') ?? $this->choice(
135+
$this->variables['QUEUE_CONNECTION'] = $this->option('queue') ?? $this->choice(
136136
trans('command/messages.environment.app.queue_driver'),
137137
self::ALLOWED_QUEUE_DRIVERS,
138138
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null

app/Http/Controllers/Admin/NodesController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public function viewServers($node)
263263
*/
264264
public function updateSettings(NodeFormRequest $request, Node $node)
265265
{
266-
$this->updateService->handle($node, $request->normalize());
266+
$this->updateService->handle($node, $request->normalize(), $request->input('reset_secret') === 'on');
267267
$this->alert->success(trans('admin/node.notices.node_updated'))->flash();
268268

269269
return redirect()->route('admin.nodes.view.settings', $node->id)->withInput();
@@ -289,7 +289,7 @@ public function allocationRemoveSingle(int $node, Allocation $allocation): Respo
289289
* Removes multiple individual allocations from a node.
290290
*
291291
* @param \Illuminate\Http\Request $request
292-
* @param int $node
292+
* @param int $node
293293
* @return \Illuminate\Http\Response
294294
*
295295
* @throws \Pterodactyl\Exceptions\Service\Allocation\ServerUsingAllocationException

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
1414
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationRequest;
1515
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationsRequest;
16+
use Pterodactyl\Http\Requests\Api\Application\Locations\StoreLocationRequest;
1617
use Pterodactyl\Http\Requests\Api\Application\Locations\DeleteLocationRequest;
1718
use Pterodactyl\Http\Requests\Api\Application\Locations\UpdateLocationRequest;
1819

@@ -92,7 +93,7 @@ public function view(GetLocationRequest $request): array
9293
* Store a new location on the Panel and return a HTTP/201 response code with the
9394
* new location attached.
9495
*
95-
* @param \Pterodactyl\Http\Controllers\Api\Application\Locations\StoreLocationRequest $request
96+
* @param \Pterodactyl\Http\Requests\Api\Application\Locations\StoreLocationRequest $request
9697
* @return \Illuminate\Http\JsonResponse
9798
*
9899
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ public function index(GetAllocationsRequest $request): array
7171
* Store new allocations for a given node.
7272
*
7373
* @param \Pterodactyl\Http\Requests\Api\Application\Allocations\StoreAllocationRequest $request
74-
* @return array
74+
* @return \Illuminate\Http\Response
7575
*
7676
* @throws \Pterodactyl\Exceptions\Service\Allocation\CidrOutOfRangeException
7777
* @throws \Pterodactyl\Exceptions\Service\Allocation\InvalidPortMappingException
7878
* @throws \Pterodactyl\Exceptions\Service\Allocation\PortOutOfRangeException
7979
* @throws \Pterodactyl\Exceptions\Service\Allocation\TooManyPortsInRangeException
8080
*/
81-
public function store(StoreAllocationRequest $request): array
81+
public function store(StoreAllocationRequest $request): Response
8282
{
8383
$this->assignmentService->handle($request->getModel(Node::class), $request->validated());
8484

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function store(StoreNodeRequest $request): JsonResponse
125125
public function update(UpdateNodeRequest $request): array
126126
{
127127
$node = $this->updateService->handle(
128-
$request->getModel(Node::class), $request->validated()
128+
$request->getModel(Node::class), $request->validated(), $request->input('reset_secret') === true
129129
);
130130

131131
return $this->fractal->item($node)

app/Http/Controllers/Auth/ForgotPasswordController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ protected function sendResetLinkFailedResponse(Request $request, $response): Red
2727
// exist on the system.
2828
event(new FailedPasswordReset($request->ip(), $request->input('email')));
2929

30-
return $this->sendResetLinkResponse(Password::RESET_LINK_SENT);
30+
return $this->sendResetLinkResponse($request, Password::RESET_LINK_SENT);
3131
}
3232
}

0 commit comments

Comments
 (0)