Commit Graph
313 Commits
Author SHA1 Message Date
robert dennis 56fb932a73 action cleanup 2026-10-08 17:40:00 -04:00
Sky Mulley ff9527a2e9 fix tests to pass 2026-10-08 09:54:19 +01: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
Sandip Ghimire bb4e89826e fix(security): harden path validation, session revocation, and request handling (#7255)
# Security, Validation & Session Improvements

## Changes

* **Hardened IP/CIDR validation**
* Properly handles invalid IP addresses and CIDR ranges during API key
creation.
* Invalid IP/CIDR data now fails safely instead of causing a 500 error.

* **Improved reCAPTCHA error handling**
  * Handles network and verification failures gracefully.
  * Fixed undefined result notices and removed duplicate checks.

* **Added file permission activity logging**
* File permission (`chmod`) changes are now recorded in the activity
log.

* **Removed duplicate 2FA middleware**
* Cleaned up duplicate `RequireTwoFactorAuthentication` registration
from API routes.

* **Improved session revocation on password changes**
  * Password changes now invalidate other active sessions.
* Rotates the `remember_token` and removes stale database sessions where
applicable.
* Applies consistently across password resets and user password changes.

* **Reduced unnecessary public storage access**
* Disabled automatic public storage routes for the local filesystem disk
to reduce the attack surface.

* **Hardened file manager request validation**
  * Added strict validation for file permission modes.
  * Fixed optional `root` validation rules.
  * Added length limits for file paths, roots, and file/folder names.

* **Hardened mount source and target path validation**
* Prevents path traversal and subpath-based bypasses in mount source and
target validation.
  * Handles trailing slashes and normalized paths correctly.
* Prevents mounts from targeting protected subdirectories, such as
another server's volume directory.
2026-10-07 12:39:12 -04:00
robert dennis 368b4bf6a6 regex fixes 2026-10-06 20:11:59 -04:00
robert dennis 7db75f2e4a install handling cleanup 2026-10-06 20:11:59 -04:00
DarkZmaj fcec806acb Apply Pint formatting to two extension files (#7250)
## Problem

`vendor/bin/pint --test` fails on the current 2.0 development branch,
which fails the Tests workflow for every pull request.

## Reproduction

Run `vendor/bin/pint --test --parallel --cache-file=.pint.cache app
bootstrap/app.php bootstrap/tests.php config database routes tests` on a
clean checkout. It reports two files:
`app/Http/Requests/Api/Admin/Extensions/InstallExtensionRequest.php` and
`app/Services/Extensions/ExtensionPackageLocator.php`.

## Root cause

Two recent changes were merged without running Pint. One docblock uses
`@inheritdoc` where the project style wants `{@inheritdoc}`, and one
blank line contains trailing whitespace.

## Fix

Run Pint on exactly those two files. The change is one docblock line and
one whitespace only line.

## Testing

`vendor/bin/pint --test` on the same paths passes afterwards. No
behaviour changes.

## Compatibility considerations

None. Formatting only.
2026-10-06 15:17:00 +01:00
Sky Mulley 240aaf62ea properly handle file permissions regarding to creation and updating 2026-10-06 13:51:34 +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 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 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
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 a264791fd4 Update PHP and JS dependencies to latest versions and modernize codebase (#5446) 2025-12-20 15:55:13 -08: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 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 371c7a671d api: fix docker_image validation for local images (#5103) 2024-05-21 13:29:31 -06:00
Matthew Penner f671046947 admin: tweaks to validation and rendering 2024-04-10 18:13:25 -06:00
Matthew Penner 1172d71d31 app: improve docker_image validation 2024-04-10 17:22:29 -06:00
Matthew Penner 1d38b4f0e2 Laravel 10 (#4706) 2023-02-23 12:30:16 -07:00
Devonte W b746c3ead1 fix(api/client): add validation for backup request body (#4704) 2023-02-23 12:23:12 -07:00
Matthew Penner 2b14e46eec api: fix sequence_id being ignored in server task API
Closes #4434
2023-01-24 15:57:24 -07:00
Matthew Penner 4626118d77 app: fix remaining email config keys 2022-12-12 14:31:49 -07:00
Lance Pioch a4f6870518 server: track reinstall failures differently from initial install failures (#4531) 2022-11-21 13:53:54 -07:00
Boy132 032e4f2e31 Apply node maintenance mode to servers (#4421) 2022-11-06 16:02:30 -07:00
Lance Pioch 4032481a4f Update validation rules for remote activity logs (#4526) 2022-11-06 15:42:48 -07:00
Boy132 f2095e815e Allow users to change the server description (#4420) 2022-10-31 10:20:53 -06:00
Lance Pioch e49ba65709 Fix config key names (#4464) 2022-10-23 18:51:20 -06:00
Matthew PennerandDaneEveritt cbcf62086f Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00
Matthew PennerandDaneEveritt 95e15d2c8a Cleanup FQDN validation logic, fallback to old hostname check (#4409)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-09 16:19:16 -06:00
Devonte 9b531d5fd9 Include oom_disabled in application API request (#4262) 2022-10-04 20:12:46 -06:00
Matthew Penner 7b91c38396 Lookup both A and AAAA records for node FQDNs (#4398)
Allows IPv6 addresses to be used, instead of IPv4 being required.

Closes <https://github.com/pterodactyl/panel/issues/4011>
2022-10-04 20:03:52 -06:00
Matthew Penner 2dcc46ecd6 backups: support Cloudflare R2 by listing uploaded parts from Wings 2022-09-26 11:15:52 -06:00
Matthew Penner 68e9100e57 admin(eggs): add force_outgoing_ip option (#4323)
Closes #3841
2022-09-25 13:24:54 -06:00
DaneEveritt 1eee55b27c Add endpoint needed for recieving and processing activity 2022-07-09 17:45:38 -04:00
DaneEveritt 7224ca81de Fix bug preventing the creation of API keys with CIDR ranges 2022-06-18 14:21:20 -04:00
Boy132 025e1a21ae fix validator import (#4094) 2022-05-30 10:24:59 -04:00
DaneEveritt c14c7b436e Pass along new fields to Wings instance when endpoint is used; closes #4048 2022-05-28 13:45:23 -04:00
DaneEveritt b051718afe Fix up API handling logic for keys and set a prefix on all keys 2022-05-22 19:03:51 -04:00
DaneEveritt e9c633fd03 Update transformers and controllers to no longer pull an API key attribute 2022-05-22 15:37:39 -04:00
DaneEveritt e313dff674 Massively simplify API binding logic
Changes the API internals to use normal Laravel binding which automatically supports nested-models and can determine their relationships. This removes a lot of confusingly complex internal logic and replaces it with standard Laravel code.

This also removes a deprecated "getModel" method and fully replaces it with a "parameter" method that does stricter type-checking.
2022-05-22 14:10:01 -04:00
DaneEveritt a9364061c1 Store keys in standard format; query with fingerprint not public key 2022-05-15 16:41:15 -04:00
DaneEveritt 412ac5ef39 Have the panel handle all of the authorization for both public key and password based attempts 2022-05-15 16:00:08 -04:00
DaneEveritt 12927a3202 Update SFTP authentication endpoint to support returning user public keys 2022-05-15 15:37:58 -04:00
DaneEveritt 6554164252 Add test coverage for the SSH key endpoints 2022-05-14 18:08:48 -04:00
DaneEveritt 97280a62a2 Add support for storing SSH keys on user accounts 2022-05-14 17:31:53 -04:00
DaneEveritt c8faf64059 Support naming docker images on eggs; closes #4052
Bumps PTDL_v1 export images to PTDL_v2, updates the Minecraft specific eggs to use named images.
2022-05-07 17:45:22 -04:00