12 Commits

Author SHA1 Message Date
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
Matthew Penner
8ca098940a chore: update composer dependencies (#5198)
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-10-21 19:18:20 -06:00
Matthew Penner
1d38b4f0e2 Laravel 10 (#4706) 2023-02-23 12:30:16 -07:00
Matthew Penner
cbcf62086f Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00
Dane Everitt
a043071e3c Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
2021-01-23 12:12:54 -08:00
Dane Everitt
c20d53bb17 Always return the primary allocation for a server, even without the allocation permissions 2020-11-07 09:57:53 -08:00
Dane Everitt
cd3572730b Add test coverage to ensure filters don't unexpectedly get broken 2020-10-15 21:52:26 -07:00
Dane Everitt
40d44598da Add test coverage for change to endpoint 2020-10-15 21:32:49 -07:00
Dane Everitt
f0ac0725b6 [Security] Don't return all servers on the system when not a root admin and admin level servers are requested
Cleaned up the API endpoint by simplifying the logic and adds test case to cover this bug.

If you ever need to list _all_ of the servers on the system you should be using the application API endpoint for the servers most likely.
2020-07-26 10:43:46 -07:00
Dane Everitt
4122486468 Fix failing tests (which caught a bug in the new client query) 2020-07-09 21:32:31 -07:00
Dane Everitt
8cfdb3acce Add test cases for sending a command to a server 2020-06-27 12:04:41 -07:00
Dane Everitt
fc261fe20c Add test cases for client servers endpoint 2020-06-27 10:35:02 -07:00