Commit Graph
459 Commits
Author SHA1 Message Date
robert dennis 56fb932a73 action cleanup 2026-10-08 17:40:00 -04:00
robert dennis bc50a8bbeb backend cleanup 2026-10-08 17:22:14 -04:00
robert dennis 8d4f47fa6a extensions facade 2026-10-08 16:53:56 -04:00
Sky Mulley 173f2da8c3 fix issue where chmod would be refused by wings due to it not being string typed 2026-10-08 09:43:07 +01:00
robert dennis f154449a80 console command cleanup 2026-10-07 16:32:56 -04:00
robert dennis db123d2fef provider registration fix 2026-10-07 16:32:56 -04:00
robert dennis bd2c62fc6f extension migration fixes 2026-10-07 16:27:19 -04:00
robert dennis fb08b51ae8 composer package checks 2026-10-07 16:22:56 -04:00
robert dennis 752a132773 composer autoloader guard 2026-10-07 16:16:18 -04:00
Sky Mulley c4281195f9 fix issue where scheduled backups would crash the panel 2026-10-07 11:05:45 +01:00
Sky Mulley 570e92accc fix install extension as url tests not passing 2026-10-07 10:57:16 +01:00
Sky Mulley dd81db5d4d implement ability to set icon for extensions 2026-10-07 10:46:54 +01:00
Sky Mulley 393a14c40e fix issue where PTERODACTYL_FILES_MAX_EDIT_SIZE wouldn't be respected correctly 2026-10-07 09:29:10 +01:00
Anthony 178f8b64eb install extension via url 2026-10-06 23:31:44 -05:00
Joshua Piper 6f91bdbb54 Prevent leaking password reset token to reCAPTCHA (#7258)
Changes the panel's default `Referrer-Policy` from
`no-referrer-when-downgrade` to `strict-origin-when-cross-origin`.

Prevents path and query string being sent in `Referrer`, so Google don't
get our tasty password reset url tokens.

Nothing I could find in panel reads a referrer cross-origin, and Wings
checks Origin not Referrer.
2026-10-06 23:00:11 -04:00
DarkZmaj 13d7dfa819 Make the telemetry scheduler test independent of other nodes in the database (#7249)
## Problem

`Tests\Integration\Console\SchedulerTest` (telemetry is scheduled and
sent only when enabled, dataset true) fails when the whole integration
suite runs, with `Failed asserting that actual size 22 matches expected
size 2`. It passes when the file is run on its own.

## Reproduction

Run `vendor/bin/pest tests/Integration` on a fresh checkout of the 2.0
development branch with the settings from `.env.ci` (it fails the same
way on Linux with PHP 8.3 and 8.4 against MariaDB 11 and MySQL 8, and on
Windows). Run `vendor/bin/pest
tests/Integration/Console/SchedulerTest.php` alone and it passes.

## Root cause

The test creates one node and then asserts that exactly two HTTP
requests were recorded: the telemetry request and the request for that
node. When the scheduler test runs inside the full suite, other
integration tests have already left committed node rows in the database
(21 nodes existed when the test ran). The telemetry job fetches system
information from every node, so each of those nodes adds another
request. Only the telemetry URL was faked, so the extra requests were
real outbound connection attempts to the random addresses of the
leftover factory nodes.

## Fix

* Fake every other URL with an empty successful response, so the test
can never make real network requests.
* Assert what the test is about, which is that exactly one telemetry
request is sent, instead of the total number of requests. The existing
assertion that the telemetry payload contains the created node is kept.

## Testing

* `vendor/bin/pest tests/Integration/Console/SchedulerTest.php` passes.
* The full `vendor/bin/pest tests/Integration` run no longer reports
this test as failed (on Windows the remaining failures there come from
missing `pdo_sqlite` and POSIX file modes and are unrelated).

## Compatibility considerations

Test only change. No application code, configuration or behaviour is
touched.
2026-10-06 22:47:23 -04:00
Joshua Piper 66ce0f2a16 Fix 2 SFTP Lockout Ratelimit Bugs (#7257)
Fixes two SFTP lockout bugs:

- `ad374661f` moved the server lookup after the password check, so fake
server identifiers bypassed the rate limit.
- `24f340c9a` keyed the lockout on server + Wings IP, so anyone could
lock every user out of a server.

Unknown servers are now rejected before any credential check, and the
lockout is keyed on the normalised username + resolved server UUID.
2026-10-06 22:46:46 -04:00
robert dennis 4a6377c675 provider loading cleanup 2026-10-06 20:11:59 -04:00
robert dennis 368b4bf6a6 regex fixes 2026-10-06 20:11:59 -04:00
robert dennis 5a15f59eab console command fixes 2026-10-06 20:11:59 -04:00
robert dennis c1b7294469 autoload validation 2026-10-06 20:11:59 -04:00
robert dennis cd24c7fe04 action wrapping cleanup 2026-10-06 20:11:59 -04:00
robert dennis 7db75f2e4a install handling cleanup 2026-10-06 20:11:59 -04:00
robert dennis ce6d0e1fe5 theme asset handling 2026-10-06 20:11:59 -04:00
robert dennis 23a05fc567 minor fixes 2026-10-06 20:11:59 -04:00
robert dennis 8ebfdf8119 settings cleanup 2026-10-06 20:11:59 -04:00
robert dennis 0899d6babb tighten setting file checks 2026-10-06 20:11:59 -04:00
robert dennis 16b0198593 extension route middleware tweaks 2026-10-06 20:11:59 -04:00
robert dennis db5f27bdcd route registration cleanup 2026-10-06 20:11:59 -04:00
robert dennis e284c381aa asset handling cleanup 2026-10-06 12:20:52 -04:00
Sky Mulley 240aaf62ea properly handle file permissions regarding to creation and updating 2026-10-06 13:51:34 +01:00
Sky Mulley 76b49b1be1 improve reset password security 2026-10-06 13:13:39 +01:00
Sky Mulley c848794e13 hide recaptcha inputted secret key from settings 2026-10-06 12:57:00 +01:00
Sky Mulley ad374661f2 prevent ability to scrape usernames from panel by preventing timing differences between correct and wrong usernames 2026-10-06 12:53:25 +01:00
Anthony e52fdfd416 Fix extension translations staying cached after an extension update
Fixes #7245
2026-10-06 00:18:41 -05:00
Sky Mulley 9c623eca71 port fix from 1.0 for display exceptions not returning correctly on api 2026-10-06 02:10:17 +01:00
Sky Mulley 90fc8c7005 fix issue where saving a subuser with more permissions than you would strip their permissions 2026-10-06 01:17:42 +01:00
Sky Mulley 7c29f38e01 prevent deleted users from having their ips leaked in activity logs 2026-10-06 01:11:19 +01:00
Sky Mulley 2098551873 implement extension size cap to prevent zip bombs 2026-10-06 01:10:38 +01:00
Sky Mulley 6533e91b62 don't allow extensions to be installed from admin api 2026-10-06 01:06:15 +01:00
Sky Mulley 5fdc4ec5f6 validate enabled bool on extension install through admin 2026-10-06 00:24:39 +01:00
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00
robert dennis 73eaeb13c6 Update RunHooksCommandTest.php 2026-06-05 12:26:45 -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
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 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
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 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