Skip to content

Commit

Permalink
Merge branch '1.0-develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpi committed Jun 2, 2024
2 parents 5bcf6fd + f8dfef0 commit 48eb35e
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 26 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@ This file is a running track of new features and fixes to each version of the pa

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

## v1.11.7

### Added

* Java 21 to Minecraft eggs

### Changed

* Updated Minecraft EULA link

### Fixed

* Fixed backups not ever being marked as completed (#5088)
* Fixed `.7z` files not being detected as a compressed file (#5016)

## v1.11.6

### Changed

* Better node ownership checks for internal backup endpoints
* Improved validation rules on `docker_image` fields to prevent invalid inputs

### Fixed

* Multiple XSS vulnerabilities in the admin area ([GHSA-384w-wffr-x63q](https://github.com/pterodactyl/panel/security/advisories/GHSA-384w-wffr-x63q))

## v1.11.5
### Fixed
* Rust egg using the wrong Docker image, breaking Rust modding frameworks.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ Stop settling for less. Make game servers a first class citizen on your platform
I would like to extend my sincere thanks to the following sponsors for helping fund Pterodactyl's development.
[Interested in becoming a sponsor?](https://github.com/sponsors/matthewpi)

| Company | About |
|-----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [**Aussie Server Hosts**](https://aussieserverhosts.com/) | No frills Australian Owned and operated High Performance Server hosting for some of the most demanding games serving Australia and New Zealand. |
| [**BisectHosting**](https://www.bisecthosting.com/) | BisectHosting provides Minecraft, Valheim and other server hosting services with the highest reliability and lightning fast support since 2012. |
| [**MineStrator**](https://minestrator.com/) | Looking for the most highend French hosting company for your minecraft server? More than 24,000 members on our discord trust us. Give us a try! |
| [**VibeGAMES**](https://vibegames.net/) | VibeGAMES is a game server provider that specializes in DDOS protection for the games we offer. We have multiple locations in the US, Brazil, France, Germany, Singapore, Australia and South Africa. |
| [**HostEZ**](https://hostez.io) | US & EU Rust & Minecraft Hosting. DDoS Protected bare metal, VPS and colocation with low latency, high uptime and maximum availability. EZ! |
| [**Blueprint**](https://blueprint.zip/?pterodactyl=true) | Create and install Pterodactyl addons and themes with the growing Blueprint framework - the package-manager for Pterodactyl. Use multiple modifications at once without worrying about conflicts and make use of the large extension ecosystem. |
| Company | About |
|--------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [**Aussie Server Hosts**](https://aussieserverhosts.com/) | No frills Australian Owned and operated High Performance Server hosting for some of the most demanding games serving Australia and New Zealand. |
| [**BisectHosting**](https://www.bisecthosting.com/) | BisectHosting provides Minecraft, Valheim and other server hosting services with the highest reliability and lightning fast support since 2012. |
| [**MineStrator**](https://minestrator.com/) | Looking for the most highend French hosting company for your minecraft server? More than 24,000 members on our discord trust us. Give us a try! |
| [**HostEZ**](https://hostez.io) | US & EU Rust & Minecraft Hosting. DDoS Protected bare metal, VPS and colocation with low latency, high uptime and maximum availability. EZ! |
| [**Blueprint**](https://blueprint.zip/?pterodactyl=true) | Create and install Pterodactyl addons and themes with the growing Blueprint framework - the package-manager for Pterodactyl. Use multiple modifications at once without worrying about conflicts and make use of the large extension ecosystem. |
| [**indifferent broccoli**](https://indifferentbroccoli.com/) | indifferent broccoli is a game server hosting and rental company. With us, you get top-notch computer power for your gaming sessions. We destroy lag, latency, and complexity--letting you focus on the fun stuff. |

### Supported Games

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,22 @@ public function __invoke(Request $request, string $backup): JsonResponse
throw new BadRequestHttpException('A non-empty "size" query parameter must be provided.');
}

/** @var \Pterodactyl\Models\Backup $backup */
$backup = Backup::query()
->where('node_id', $node->id)
/** @var \Pterodactyl\Models\Backup $model */
$model = Backup::query()
->where('uuid', $backup)
->firstOrFail();

// Check that the backup is "owned" by the node making the request. This avoids other nodes
// from messing with backups that they don't own.
/** @var \Pterodactyl\Models\Server $server */
$server = $model->server;
if ($server->node_id !== $node->id) {
throw new HttpForbiddenException('You do not have permission to access that backup.');

Check failure on line 55 in app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Instantiated class Pterodactyl\Http\Controllers\Api\Remote\Backups\HttpForbiddenException not found.

Check failure on line 55 in app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Throwing object of an unknown class Pterodactyl\Http\Controllers\Api\Remote\Backups\HttpForbiddenException.
}

// Prevent backups that have already been completed from trying to
// be uploaded again.
if (!is_null($backup->completed_at)) {
if (!is_null($model->completed_at)) {
throw new ConflictHttpException('This backup is already in a completed state.');
}

Expand All @@ -61,7 +68,7 @@ public function __invoke(Request $request, string $backup): JsonResponse
}

// The path where backup will be uploaded to
$path = sprintf('%s/%s.tar.gz', $backup->server->uuid, $backup->uuid);
$path = sprintf('%s/%s.tar.gz', $model->server->uuid, $model->uuid);

// Get the S3 client
$client = $adapter->getClient();
Expand Down Expand Up @@ -99,7 +106,7 @@ public function __invoke(Request $request, string $backup): JsonResponse
}

// Set the upload_id on the backup in the database.
$backup->update(['upload_id' => $params['UploadId']]);
$model->update(['upload_id' => $params['UploadId']]);

return new JsonResponse([
'parts' => $parts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Pterodactyl\Http\Controllers\Controller;
use Pterodactyl\Extensions\Backups\BackupManager;
use Pterodactyl\Extensions\Filesystem\S3Filesystem;
use Pterodactyl\Exceptions\Http\HttpForbiddenException;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Pterodactyl\Http\Requests\Api\Remote\ReportBackupCompleteRequest;

Expand All @@ -36,10 +37,17 @@ public function index(ReportBackupCompleteRequest $request, string $backup): Jso

/** @var \Pterodactyl\Models\Backup $model */
$model = Backup::query()
->where('node_id', $node->id)
->where('uuid', $backup)
->firstOrFail();

// Check that the backup is "owned" by the node making the request. This avoids other nodes
// from messing with backups that they don't own.
/** @var \Pterodactyl\Models\Server $server */
$server = $model->server;
if ($server->node_id !== $node->id) {
throw new HttpForbiddenException('You do not have permission to access that backup.');
}

if ($model->is_successful) {
throw new BadRequestHttpException('Cannot update the status of a backup that is already marked as completed.');
}
Expand Down
5 changes: 3 additions & 2 deletions database/Seeders/eggs/minecraft/egg-bungeecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2022-06-17T08:10:44+03:00",
"exported_at": "2024-05-07T12:55:57+00:00",
"name": "Bungeecord",
"author": "[email protected]",
"description": "For a long time, Minecraft server owners have had a dream that encompasses a free, easy, and reliable way to connect multiple Minecraft servers together. BungeeCord is the answer to said dream. Whether you are a small server wishing to string multiple game-modes together, or the owner of the ShotBow Network, BungeeCord is the ideal solution for you. With the help of BungeeCord, you will be able to unlock your community's full potential.",
Expand All @@ -14,6 +14,7 @@
"pid_limit"
],
"docker_images": {
"Java 21": "ghcr.io\/pterodactyl\/yolks:java_21",
"Java 17": "ghcr.io\/pterodactyl\/yolks:java_17",
"Java 16": "ghcr.io\/pterodactyl\/yolks:java_16",
"Java 11": "ghcr.io\/pterodactyl\/yolks:java_11",
Expand Down Expand Up @@ -56,4 +57,4 @@
"field_type": "text"
}
]
}
}
5 changes: 3 additions & 2 deletions database/Seeders/eggs/minecraft/egg-forge-minecraft.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2022-11-06T06:33:01-05:00",
"exported_at": "2024-05-07T12:55:56+00:00",
"name": "Forge Minecraft",
"author": "[email protected]",
"description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.",
Expand All @@ -14,6 +14,7 @@
"pid_limit"
],
"docker_images": {
"Java 21": "ghcr.io\/pterodactyl\/yolks:java_21",
"Java 17": "ghcr.io\/pterodactyl\/yolks:java_17",
"Java 16": "ghcr.io\/pterodactyl\/yolks:java_16",
"Java 11": "ghcr.io\/pterodactyl\/yolks:java_11",
Expand Down Expand Up @@ -76,4 +77,4 @@
"field_type": "text"
}
]
}
}
5 changes: 3 additions & 2 deletions database/Seeders/eggs/minecraft/egg-paper.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2022-06-17T08:11:30+03:00",
"exported_at": "2024-05-07T12:55:55+00:00",
"name": "Paper",
"author": "[email protected]",
"description": "High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.",
Expand All @@ -14,6 +14,7 @@
"pid_limit"
],
"docker_images": {
"Java 21": "ghcr.io\/pterodactyl\/yolks:java_21",
"Java 17": "ghcr.io\/pterodactyl\/yolks:java_17",
"Java 16": "ghcr.io\/pterodactyl\/yolks:java_16",
"Java 11": "ghcr.io\/pterodactyl\/yolks:java_11",
Expand Down Expand Up @@ -76,4 +77,4 @@
"field_type": "text"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2022-06-17T08:11:42+03:00",
"exported_at": "2024-05-07T12:55:54+00:00",
"name": "Sponge (SpongeVanilla)",
"author": "[email protected]",
"description": "SpongeVanilla is the SpongeAPI implementation for Vanilla Minecraft.",
Expand All @@ -14,6 +14,7 @@
"pid_limit"
],
"docker_images": {
"Java 21": "ghcr.io\/pterodactyl\/yolks:java_21",
"Java 16": "ghcr.io\/pterodactyl\/yolks:java_16",
"Java 11": "ghcr.io\/pterodactyl\/yolks:java_11",
"Java 8": "ghcr.io\/pterodactyl\/yolks:java_8"
Expand Down Expand Up @@ -55,4 +56,4 @@
"field_type": "text"
}
]
}
}
5 changes: 3 additions & 2 deletions database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2022-06-17T08:11:58+03:00",
"exported_at": "2024-05-07T12:55:58+00:00",
"name": "Vanilla Minecraft",
"author": "[email protected]",
"description": "Minecraft is a game about placing blocks and going on adventures. Explore randomly generated worlds and build amazing things from the simplest of homes to the grandest of castles. Play in Creative Mode with unlimited resources or mine deep in Survival Mode, crafting weapons and armor to fend off dangerous mobs. Do all this alone or with friends.",
Expand All @@ -14,6 +14,7 @@
"pid_limit"
],
"docker_images": {
"Java 21": "ghcr.io\/pterodactyl\/yolks:java_21",
"Java 17": "ghcr.io\/pterodactyl\/yolks:java_17",
"Java 16": "ghcr.io\/pterodactyl\/yolks:java_16",
"Java 11": "ghcr.io\/pterodactyl\/yolks:java_11",
Expand Down Expand Up @@ -56,4 +57,4 @@
"field_type": "text"
}
]
}
}
1 change: 1 addition & 0 deletions resources/scripts/api/transformers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const rawDataToFileObject = (data: FractalResponseData): FileObject => ({
'application/x-xz', // .tar.xz, .xz
'application/zstd', // .tar.zst, .zst
'application/zip', // .zip
'application/x-7z-compressed', // .7z
].indexOf(this.mimetype) >= 0
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const EulaModalFeature = () => {
target={'_blank'}
css={tw`text-primary-300 underline transition-colors duration-150 hover:text-primary-400`}
rel={'noreferrer noopener'}
href="https://account.mojang.com/documents/minecraft_eula"
href='https://www.minecraft.net/eula'

Check failure on line 75 in resources/scripts/components/server/features/eula/EulaModalFeature.tsx

View workflow job for this annotation

GitHub Actions / Lint

Replace `'https://www.minecraft.net/eula'` with `"https://www.minecraft.net/eula"`
>
Minecraft® EULA
</a>
Expand Down

0 comments on commit 48eb35e

Please sign in to comment.