From 3cd15d6f2156a4f5e0c14b986c2c0e5967004890 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Tue, 11 Jul 2023 20:52:09 -0600 Subject: [PATCH 01/12] ci(docker): skip login on pull requests --- .github/workflows/docker.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 6026b38379..ffa30b3493 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -42,6 +42,7 @@ jobs: - name: Login to GitHub Container Registry uses: docker/login-action@v2 + if: "github.event_name != 'pull_request'" with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -55,7 +56,7 @@ jobs: sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:1}',/" config/app.php - name: Build and Push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . file: ./Dockerfile From 15860613b64bb52765e3b692174ed2e4f5cc8f58 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Tue, 22 Aug 2023 18:50:11 -0600 Subject: [PATCH 02/12] Update README.md --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7ad8361df4..5fa9d8f8e5 100644 --- a/README.md +++ b/README.md @@ -27,17 +27,17 @@ 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 developement. [Interested in becoming a sponsor?](https://github.com/sponsors/matthewpi) -| Company | About | -|-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**WISP**](https://wisp.gg) | Extra features. | -| [**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! | -| [**Skynode**](https://www.skynode.pro/) | Skynode provides blazing fast game servers along with a top-notch user experience. Whatever our clients are looking for, we're able to provide it! | -| [**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. | -| [**Pterodactyl Market**](https://pterodactylmarket.com/) | Pterodactyl Market is a one-and-stop shop for Pterodactyl. In our market, you can find Add-ons, Themes, Eggs, and more for Pterodactyl. | -| [**DutchIS**](https://dutchis.net?ref=pterodactyl) | DutchIS provides instant infrastructure such as pay per use VPS hosting. Start your game hosting journey on DutchIS. | -| [**Skoali**](https://skoali.com/) | Skoali is a French company that hosts game servers and other types of services (VPS, WEB, Dedicated servers, ...). We also have a free plan for Minecraft and Garry's Mod. | +| Company | About | +|-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [**WISP**](https://wisp.gg) | Extra features. | +| [**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. | +| [**Pterodactyl Market**](https://pterodactylmarket.com/) | Pterodactyl Market is a one-and-stop shop for Pterodactyl. In our market, you can find Add-ons, Themes, Eggs, and more for Pterodactyl. | +| [**DutchIS**](https://dutchis.net?ref=pterodactyl) | DutchIS provides instant infrastructure such as pay per use VPS hosting. Start your game hosting journey on DutchIS. | +| [**Skoali**](https://skoali.com/) | Skoali is a French company that hosts game servers and other types of services (VPS, WEB, Dedicated servers, ...). We also have a free plan for Minecraft and Garry's Mod. | +| [**Rabbit Computing**](https://www.rabbitcomputing.com/link.php?id=5) | Rabbit Computing offers powerful VPS servers, highly available game hosting, and fully unlimited web hosting. Use code README for 20% off your first three months! | ### Supported Games From 04d83edd361475087ee6e24b317e5be4d03f08b1 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Tue, 22 Aug 2023 18:52:13 -0600 Subject: [PATCH 03/12] app: fix `getMySQLTimezoneOffset()` truncating seconds Previously the `getMySQLTimezoneOffset()` function would truncate the seconds part of a time offset (returning `+9:00` instead of `+9:30`) for example. This only affects timezones with offsets that contain minutes. Closes https://github.com/pterodactyl/panel/issues/4821 Superseeds https://github.com/pterodactyl/panel/pull/4827 Co-authored-by: danny6167 --- app/Helpers/Time.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Helpers/Time.php b/app/Helpers/Time.php index e8e585c2bb..dde70bbc5e 100644 --- a/app/Helpers/Time.php +++ b/app/Helpers/Time.php @@ -15,8 +15,6 @@ final class Time */ public static function getMySQLTimezoneOffset(string $timezone): string { - $offset = round(CarbonImmutable::now($timezone)->getTimezone()->getOffset(CarbonImmutable::now('UTC')) / 3600); - - return sprintf('%s%s:00', $offset > 0 ? '+' : '-', str_pad((string) abs($offset), 2, '0', STR_PAD_LEFT)); + return CarbonImmutable::now($timezone)->getTimezone()->toOffsetName(); } } From aa2f797f6f1e8ce55e4885ef1855a8cd48d459fa Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Sat, 12 Aug 2023 15:51:16 -0400 Subject: [PATCH 04/12] fix panel log folder resolves #4838 Fixes an issue with the log symlink as well --- .github/docker/entrypoint.sh | 2 +- Dockerfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/docker/entrypoint.sh b/.github/docker/entrypoint.sh index d3df9c1505..9cd4c9b0fc 100644 --- a/.github/docker/entrypoint.sh +++ b/.github/docker/entrypoint.sh @@ -3,7 +3,7 @@ cd /app mkdir -p /var/log/panel/logs/ /var/log/supervisord/ /var/log/nginx/ /var/log/php7/ \ && chmod 777 /var/log/panel/logs/ \ - && ln -s /var/log/panel/logs/ /app/storage/logs/ + && ln -s /app/storage/logs/ /var/log/panel/ ## check for .env file and generate app keys if missing if [ -f /app/var/.env ]; then diff --git a/Dockerfile b/Dockerfile index e215d94066..aae05a526e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,7 @@ RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar un && chmod 777 -R bootstrap storage \ && composer install --no-dev --optimize-autoloader \ && rm -rf .env bootstrap/cache/*.php \ + && mkdir -p /app/storage/logs/ \ && chown -R nginx:nginx . RUN rm /usr/local/etc/php-fpm.conf \ From 987440c8cad8afa8f924c3defd827e8b333fb32b Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Tue, 22 Aug 2023 18:59:34 -0600 Subject: [PATCH 05/12] app: fix formatting --- app/Helpers/Time.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Helpers/Time.php b/app/Helpers/Time.php index dde70bbc5e..d68f353303 100644 --- a/app/Helpers/Time.php +++ b/app/Helpers/Time.php @@ -15,6 +15,6 @@ final class Time */ public static function getMySQLTimezoneOffset(string $timezone): string { - return CarbonImmutable::now($timezone)->getTimezone()->toOffsetName(); + return CarbonImmutable::now($timezone)->getTimezone()->toOffsetName(); } } From a83058668fe9e3bc6c5ab2b61f73251fef9bd719 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Tue, 30 May 2023 16:11:07 +0200 Subject: [PATCH 06/12] only files check for "read-content", check folders for "read" fixes #4792 --- resources/scripts/components/server/files/FileObjectRow.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/scripts/components/server/files/FileObjectRow.tsx b/resources/scripts/components/server/files/FileObjectRow.tsx index 8032dab1e4..08a3240c29 100644 --- a/resources/scripts/components/server/files/FileObjectRow.tsx +++ b/resources/scripts/components/server/files/FileObjectRow.tsx @@ -16,12 +16,13 @@ import { bytesToString } from '@/lib/formatters'; import styles from './style.module.css'; const Clickable: React.FC<{ file: FileObject }> = memo(({ file, children }) => { + const [canRead] = usePermissions(['file.read']); const [canReadContents] = usePermissions(['file.read-content']); const directory = ServerContext.useStoreState((state) => state.files.directory); const match = useRouteMatch(); - return !canReadContents || (file.isFile && !file.isEditable()) ? ( + return (file.isFile && (!file.isEditable() || !canReadContents)) || (!file.isFile && !canRead) ? (
{children}
) : ( Date: Thu, 25 May 2023 23:29:48 +0300 Subject: [PATCH 07/12] fix(4752): check if description field present on request --- app/Http/Controllers/Api/Client/Servers/SettingsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/Client/Servers/SettingsController.php b/app/Http/Controllers/Api/Client/Servers/SettingsController.php index e84c15910b..b939f16806 100644 --- a/app/Http/Controllers/Api/Client/Servers/SettingsController.php +++ b/app/Http/Controllers/Api/Client/Servers/SettingsController.php @@ -35,7 +35,7 @@ public function __construct( public function rename(RenameServerRequest $request, Server $server): JsonResponse { $name = $request->input('name'); - $description = $request->input('description') ?? $server->description; + $description = $request->has('description') ? (string) $request->input('description') : $server->description; $this->repository->update($server->id, [ 'name' => $name, 'description' => $description, From 2d4071ca255a966154cb23083b7fa9cc4cb21342 Mon Sep 17 00:00:00 2001 From: Vadym Date: Fri, 21 Apr 2023 22:01:03 +0300 Subject: [PATCH 08/12] do not show strings with password in notification text --- resources/scripts/components/server/databases/DatabaseRow.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/scripts/components/server/databases/DatabaseRow.tsx b/resources/scripts/components/server/databases/DatabaseRow.tsx index 9d2c05a73c..017ff56610 100644 --- a/resources/scripts/components/server/databases/DatabaseRow.tsx +++ b/resources/scripts/components/server/databases/DatabaseRow.tsx @@ -119,14 +119,14 @@ export default ({ database, className }: Props) => {
- +
- +
From 1af200c46403d0bca291b9027713031e29ffdbe3 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Tue, 18 Apr 2023 11:51:49 +0200 Subject: [PATCH 09/12] Replace `bin.ptdl.co` with `pteropaste.com` ptdl.co always has cert issues. pteropaste is used anywhere else (e.g. in Discord bot commands) Also increased the line number to 150. --- .github/ISSUE_TEMPLATE/bug-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index adf3d27383..c7bc63aadd 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -68,8 +68,8 @@ body: Run the following command to collect logs on your system. Wings: `sudo wings diagnostics` - Panel: `tail -n 100 /var/www/pterodactyl/storage/logs/laravel-$(date +%F).log | nc bin.ptdl.co 99` - placeholder: "https://bin.ptdl.co/a1h6z" + Panel: `tail -n 150 /var/www/pterodactyl/storage/logs/laravel-$(date +%F).log | nc pteropaste.com 99` + placeholder: "https://pteropaste.com/a1h6z" render: bash validations: required: false From 67b2d944a6f3cae4892f700ef9d21d304576bee8 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Wed, 23 Aug 2023 03:12:57 +0200 Subject: [PATCH 10/12] ui(client): allow MassActionBar to be clicked through (#4753) --- resources/scripts/components/server/files/MassActionsBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/components/server/files/MassActionsBar.tsx b/resources/scripts/components/server/files/MassActionsBar.tsx index 44230f2144..5d6ff42b9c 100644 --- a/resources/scripts/components/server/files/MassActionsBar.tsx +++ b/resources/scripts/components/server/files/MassActionsBar.tsx @@ -93,7 +93,7 @@ const MassActionsBar = () => { /> )} -
+
0} unmountOnExit>
From 51cee7688a7585d2830e34d260137e466d3b9226 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Wed, 23 Aug 2023 03:17:18 +0200 Subject: [PATCH 11/12] app: update prune-backup command description (#4754) --- .../Commands/Maintenance/PruneOrphanedBackupsCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php b/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php index 1ddd8cea3f..b7a04f8eee 100644 --- a/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php +++ b/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php @@ -10,7 +10,7 @@ class PruneOrphanedBackupsCommand extends Command { protected $signature = 'p:maintenance:prune-backups {--prune-age=}'; - protected $description = 'Marks all backups that have not completed in the last "n" minutes as being failed.'; + protected $description = 'Marks all backups older than "n" minutes that have not yet completed as being failed.'; /** * PruneOrphanedBackupsCommand constructor. @@ -38,7 +38,7 @@ public function handle() return; } - $this->warn("Marking $count backups that have not been marked as completed in the last $since minutes as failed."); + $this->warn("Marking $count uncompleted backups that are older than $since minutes as failed."); $query->update([ 'is_successful' => false, From 5a417e9adbf9e92a5ff3cf2b873ed5268ad70b41 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Wed, 23 Aug 2023 03:18:05 +0200 Subject: [PATCH 12/12] app(setup): replace `mail` with `sendmail` driver (#4750) --- app/Console/Commands/Environment/EmailSettingsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/Environment/EmailSettingsCommand.php b/app/Console/Commands/Environment/EmailSettingsCommand.php index d5efbc90ac..3a211394c9 100644 --- a/app/Console/Commands/Environment/EmailSettingsCommand.php +++ b/app/Console/Commands/Environment/EmailSettingsCommand.php @@ -44,7 +44,7 @@ public function handle() trans('command/messages.environment.mail.ask_driver'), [ 'smtp' => 'SMTP Server', - 'mail' => 'PHP\'s Internal Mail Function', + 'sendmail' => 'sendmail Binary', 'mailgun' => 'Mailgun Transactional Email', 'mandrill' => 'Mandrill Transactional Email', 'postmark' => 'Postmark Transactional Email',