Commit Graph
2016 Commits
Author SHA1 Message Date
SkyMulley 850f2b9a4f Disable reinstall action during normal server status if "skip egg install scripts" setting is enabled (#5696)
### Description

You're able to enable a "skip egg install scripts" per server, while
still being able to reinstall a server. With this setting enabled,
reinstalling a server has no functional use, the server is locked and
shutdown, then simply unlocked immediately afterwards after a success
signal from wings. This PR disables the reinstall button when skip
install scripts is enabled for both the user and admin, with a little
component telling you why you cannot reinstall. The reinstall button is
not disabled if the server is in a status that reinstall could resolve
(eg. failed install).

### Resolved issues:
1. [x] resolves pterodactyl/panel#5306
2026-08-10 11:39:22 -04:00
robert dennis 1d791ad615 upgrade to laravel 12.x 2026-07-28 04:44:29 +09:00
robert dennis 73d2550e1b relax overly strict permission guards on running schedules 2026-07-28 00:00:51 +09:00
robert dennis c39a7be8f5 Improve email handling 2026-06-28 17:52:34 -04:00
robert dennis ea3b492dd5 Improve key handling 2026-06-28 17:52:22 -04:00
robert dennis ace8effd07 Improve backup handling 2026-06-28 17:51:42 -04:00
robert dennis 913b354aff Improve schedule handling 2026-06-28 17:51:28 -04:00
robert dennis f38836958b adjust node deploy permissions 2026-06-24 15:45:20 -04:00
robert dennis 809122d682 scope node configure flow 2026-06-23 17:05:03 -04:00
robert dennis 24458ea087 fix external id not respecting unique during update closes #5549 2026-06-22 13:04:40 -04:00
robert dennis 01bf7b44e7 fix sanctum access token wrapper closes #5591 2026-06-21 18:52:23 -04:00
SkyMulley de034cf090 bugfix: user creation now properly appears in action log (#5644)
### Description

User creation was not properly logged within the action log, neither
from sub-user invite or manual user creation. This PR adds the relevant
log and includes testing.

### Manual testing scenarios

1. Invite a user within any created server
2. Create a user in the admin
3. Verify both users appear as an action in the action log

### Questions or comments

AI was used for secondary testing, QA and code review. No code was
written by AI.

### Resolved issues:
1. [x] resolves pterodactyl/panel#5631
2026-06-14 20:08:14 -04:00
EgoMawandMrSoulPenguin c6033400b4 Update email validation to be strict (#5583)
fixes #5576

---------

Co-authored-by: MrSoulPenguin <28676680+MrSoulPenguin@users.noreply.github.com>
2026-06-14 20:08:14 -04:00
robert dennisandClaude Opus 4.8 f04d2f52f1 Require nodes write permission for node configuration endpoint
The configuration endpoint returns the node's decrypted daemon token, so gate it behind write access instead of read. The shared single-node view request keeps read access.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 19:17:36 -04:00
robert dennisandClaude Opus 4.8 0fe702421b Cast node-reported CPU count to an integer
The admin node view renders the daemon-supplied cpu_count without escaping. Coerce it to an integer so untrusted node telemetry cannot inject markup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 19:17:29 -04:00
robert dennis 98079a0166 rate limit by ip for authentication rate limiter 2026-06-05 14:15:27 -04:00
robert dennis 2f01a047df add lifecycle hook support for install events 2026-06-05 12:25:30 -04:00
Robert Dennis 676d25c0fd wait for lock properly (#5638)
This PR is a minimal change that acquires a lock on the target model's
row, rather than calling sharedLock() on the model instance.
2026-05-29 23:47:58 -04:00
Noah Ross a94b8bdb4e Fix API Key Limit Race Condition Bypass (#5620)
The API key creation endpoint checks that a user has fewer than 25 keys
before creating a new one. The problem is that the count was read from
an eager-loaded collection (`$user->apiKeys->count()`) with no lock
held, so concurrent requests could both pass the check and each create a
key, pushing the user past the 25-key cap.

The fix wraps the count check and key creation in a single database
transaction with `lockForUpdate()` on the query. Only one request at a
time can evaluate and modify the count, closing the race window.

### Proof of Concept

Run this in the browser console while authenticated with a user that has
24 API keys:

```js
(async () => {
    const makeKey = (desc) => fetch('/api/client/account/api-keys', {
      method: 'POST',
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'X-Requested-With': 'XMLHttpRequest',
        'X-XSRF-TOKEN':
  decodeURIComponent(document.cookie.match(/XSRF-TOKEN=([^;]+)/)[1]),
      },
      body: JSON.stringify({ description: desc, allowed_ips: [] }),
    });

    const [r1, r2] = await Promise.all([makeKey('0024'), makeKey('0025')]);
    console.log('0024:', r1.status, (await r1.text()).slice(0, 200));
    console.log('0025:', r2.status, (await r2.text()).slice(0, 200));
})();
```

On the old code, both requests can return 200 (you may need to run this
a few times to hit the race window). After the fix, the second request
correctly returns a 400 error.
2026-05-23 11:16:18 -07:00
Dane Everitt 7ffcd63631 Attach a scope(s) to JWTs created by the panel (#5636)
Necessary for proper token identification on Wings.
2026-05-23 11:15:36 -07:00
Dane Everitt ec7231bd4a Lock resources more explicitly when creating databases or backups (#5613)
Addresses an issue where the concept of a lock was there, but no actual
lock was acquired.
2026-04-01 18:46:01 -07:00
Dane Everitt 56fe10fdd6 Throttle email address changes on accounts to limit enumeration (#5612)
This change applies a rate limit to account email changes to prevent
enumeration on the system. The throttle is applied at the account level.
Administrators can still update an account's email address manually to
bypass this restriction if/when necessary.
2026-04-01 17:54:30 -07:00
Carlton 33695c642d Fix transfer status permission checks (#5573) 2026-03-26 16:53:41 -07:00
Daniel Barton 51bbd10a01 Fix: Compare to correct variable in startup variable activity log (#5605)
- Fixes issue where the panel would create activity logs even when the
value didn't change
- Log an empty string instead of displaying "null" when the variable is
empty

Closes #5604
2026-03-26 16:24:02 -07:00
Daniel Barton c40f68e48a Fix: Revert changes to RunTaskJob traits to fix scheduled tasks (#5607)
This change reverts changes that were made to the traits (direct and
inherited) to RunTaskJob in
https://github.com/pterodactyl/panel/pull/5568/changes#diff-772e8e2cf1167529b09210b934e9c0ec4fe12d99c35317f293d504aaee5cb95c

Closes #5600
2026-03-26 16:21:35 -07:00
Dane Everitt a81c3b4d52 Add support for stripe-style identifiers on existing models with UUIDs (#5548)
This is a partial implementation to begin moving towards stripe-style
identifiers for resources in the system. Any models with an existing
`uuid` column can easily be updated to return an identifier in the
format of `prfx_xyz` where `prfx` is a four character prefix, and `xyz`
is the UUID, encoded using base-32.

These are quite easy to use within the API layer because we just need to
do one quick transformation to extract the UUID for those models. This
PR implements that logic for servers in the `SubstituteClientBindings`
logic.

A future PR will need to come through and handle identifiers for models
that _don't_ currently use UUIDs for reference that we want to expose to
clients. In those cases it is easier to just generate base-32 encoded
UUID7s that get stored in the database and indexed. They follow the same
base approach, but you don't need to do any transformations in the code
(other than stripping the prefix, unless we decide to store the prefix).

There is also now a `PTERODACTYL_USE_SERVER_IDENTIFIERS` environment
variable, that when set to true, updates the front-end and API response
to use this new identifier in place of the `uuidShort` value.
2026-02-14 11:21:57 -08:00
Dane Everitt 14185a9430 Improve security posture, update dependencies (#5569)
Very minor changes, just adding some default headers in the event people
don't configure this on their webserver. Also updating some packages to
resolve open security alerts.
2026-02-14 11:18:17 -08:00
Dane Everitt 0e74f3aade Improve SFTP session revocation to cover password changes and account deletion (#5568)
This expands upon previous work done to better disconnect users from
SFTP when different events occur within Pterodactyl. This new logic also
accounts for password changes and their account being deleted entirely
from the system.

These events now trigger background jobs that will reach out to every
node they are associated with to ensure they're disconnected if
currently connected.
2026-02-14 10:51:26 -08:00
Dane Everitt 7c9c56bf51 Scope the remote node token to limit the servers it can manage for backups/transfers (#5476)
Improves the security posture of things more by limiting the servers
that a node can even communicate about with the Panel.
2026-02-11 16:04:09 -08:00
Mackenzie MolloyandDaneEveritt 7576d0d08e Added support for viewing and deleting of any Application API Keys (#5176)
This PR closes Issue #5175.

For context, I am aware that Application API Keys are deprecated in
favour of Client API Keys however they are still operational within
Pterodactyl and thus, not fully removed.

Currently in Pterodactyl, as an Admin, you can only view your
Application API Keys on the Admin Panel. In this PR, I made it so all
Application Keys are visible and deletable. The key strings are
obfuscated if the key does not belong to the user viewing.


![image](https://github.com/user-attachments/assets/9edb2533-d99c-4ec3-80cc-25630fd48594)

The reason for adding this is primarily so other admin users can be
aware of and delete another admin user's Application API keys from the
UI. This functionality is useful in the event of a malicious user
compromising an admin account, creating some API Keys to continue their
attacks and the owner of the compromised admin account being unaware of
Application API Keys. In this instance, even after a password reset, the
attack could continue via the Application API without the admin
realising it.

I've tested the creation and deleting of keys along with using keys via
the Application API to ensure no breakages have occurred.

---------

Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2026-02-11 16:03:35 -08:00
Всеволод МельникandDaneEveritt 09caa0d499 Merge commit from fork
* Add throttling to resource creation endpoints

* Fix middleware registration for the throttlers

* Lock the server's resource models when adding new ones

* Throttle subusers even more

---------

Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2026-01-05 16:05:38 -08:00
Gio 3dd206ccf7 Clear allocation notes on server deletion (#5157) 2026-01-04 16:44:46 -08:00
Mackenzie Molloy 238d371352 Feature: Sort Users on Admin/Users by Administrators first (#5098) 2026-01-04 11:12:55 -08:00
Dane Everitt 032bf076d9 Ensure that TOTP tokens cannot be reused (#5481) 2025-12-30 12:27:11 -08:00
Dane Everitt 1570ff2509 Don't render raw HTML returned by the alert bag (#5475)
ref: https://github.com/pterodactyl/panel/security/advisories/GHSA-mgr9-6c2j-jxrq
2025-12-26 18:27:23 -08:00
Dane Everitt 2bd9d8badd Disconnect SFTP/Websocket when a user is removed as a subuser (#5472) 2025-12-26 17:51:25 -08:00
Dane Everitt a215f6d534 Don't be strict about upload size, so long as it is a positive integer (#5458) 2025-12-24 16:45:48 -08:00
Dane Everitt 895adb6e6f Ensure that a node description can be set, add additional test coverage (#5457) 2025-12-24 16:43:00 -08:00
Dane Everitt 0917e60a3b Return correct error message when deleting self, add test coverage (#5456) 2025-12-24 16:13:31 -08:00
Sergey Serpichenko a7c1882edf FIX: Renamed 'batch_uuid' field to 'batch' in ActivityLogService (#5396)
The field was renamed to match the column name in the database and to maintain consistency across the codebase.
2025-12-24 14:27:38 -08:00
Dane Everitt a264791fd4 Update PHP and JS dependencies to latest versions and modernize codebase (#5446) 2025-12-20 15:55:13 -08:00
Fallen_Breath 9b703fb40f fix: timezone issue in Schedule::getNextRunDate (#5381) 2025-11-08 23:32:06 -07:00
Matthew Penner 01fd763fe9 fix: add additional input validation
Signed-off-by: Matthew Penner <me@matthewp.io>
2025-06-18 12:21:26 -06:00
Matthew Penner 871ef0c564 fix: EnvironmentWriterTrait not allowing null values
Fixes https://github.com/pterodactyl/panel/issues/5108

Signed-off-by: Matthew Penner <me@matthewp.io>
2025-02-14 13:22:59 -07:00
Matthew Penner 8ca098940a chore: update composer dependencies (#5198)
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-10-21 19:18:20 -06:00
Dawid Jaworski 8ae76c3889 feat: add egg features editor in Admin UI (#5130) 2024-06-29 12:59:05 -06:00
Daniel Barton 953575ff5c fix: remove special handling for ^C stop command (#5132) 2024-06-29 12:31:10 -06:00
Daniel Barton 844537df38 fix: CIDR_MAX_BITS restricting to /27 instead of /25 (#5111) 2024-06-29 12:24:10 -06:00
Daniel Barton 371c7a671d api: fix docker_image validation for local images (#5103) 2024-05-21 13:29:31 -06:00
Matthew Penner f8dfef04c4 api(remote): fix oops in BackupStatusController, yet again 2024-05-08 18:08:18 -06:00