Compare commits

..

811 Commits

Author SHA1 Message Date
Boy132
1d02365efe
Fix eslint warnings (#3814) 2021-12-19 09:50:18 -08:00
wingdings255
1564742606
Update egg-ark--survival-evolved.json (#3809) 2021-12-19 09:44:32 -08:00
Mrxbox98
66c56b0da8
CPU Graph change (#3804) 2021-12-12 10:19:06 -08:00
Mrxbox98
15619fb8e4
Fixes overlapping Two Factor Authentication Box (#3803) 2021-12-12 10:15:44 -08:00
Alex
4e6fe112b0
fix(forge): actually fix forge regex (#3801)
For whatever reason, stupid me rebased the wrong branch in previous PR #3783 and didn't notice it, which contained the old egg instead.

This one actually fixes the regex and includes more debugging steps for easier troubleshooting.

Easy to view diff: <https://www.diffchecker.com/3iJ9lVzH>
2021-12-12 10:14:25 -08:00
Mrxbox98
f04b87a37c
FireFox Font Fix (#3805) 2021-12-12 10:14:09 -08:00
hz-ad
928b060647
Include HostEZ in sponsors list (#3788)
Update to append HostEZ to the sponsors list
2021-12-06 11:00:29 -08:00
Alex
b8bf537737
cmd(setup): validate email input, closes #3175 (#3716) 2021-12-04 10:52:09 -08:00
Charles Morgan
0d5ff6afac
Add Pug / Jade to file editor, closes #3512 (#3514) 2021-12-04 10:51:52 -08:00
Alex
5cde059f21
docs(docker): display correct variable for certificates (#3723)
Docker image and compose file uses `LE_EMAIL` and not `LETSENCRYPT_EMAIL`

Co-authored-by: Matthew Penner <me@matthewp.io>
2021-12-04 10:51:15 -08:00
Alex
0db772a82b
eggs: update source install script (#3604)
Installing basic packages are unnecessary as they already exist in yolks installer image. This also gets rid of Debian 10 lib32gcc package not being found, since installer image is Debian 11.
2021-12-04 10:50:50 -08:00
Paul Vogel
dcbc1360a9
Improve test coverage for LocationController (#3779)
By adding tests for create, update, delete
2021-12-04 10:50:36 -08:00
Patrick R
622b939f00
Show ipv6 with correct in-url syntax (#3776) 2021-12-04 10:35:55 -08:00
Lukas Moucka
e8e2911a92
Change order of docker images in JavaVersionModalFeature (#3782)
This changes the order of the Docker images in JavaVersionModalFeature, and also sets the default state to Java 17. Previously it was Java 16, even though the first entry in the list was Java 8, that confused a lot of people
2021-12-04 10:35:39 -08:00
Boy132
96c3338e96
Add the MC 1.18 message to Java Version Modal (#3778) 2021-12-04 10:35:20 -08:00
Alex
49d5ef271d
ARM64 support for the Panel Docker image, closes #3580 (#3709)
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2021-12-04 10:33:42 -08:00
Boy132
4cc8658334
GSL Token Modal Feature (#3746) 2021-12-04 10:29:24 -08:00
Yusta
a6e0e5dbda
Add app_url for mail sender (#3753)
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2021-12-04 10:26:00 -08:00
Desjardins Jérôme
10aaf00e83
use DB_PORT for mysql database connection (#3762)
DB_PORT is the env variable defined for the mysql port into Panel Configuration.
2021-12-04 10:25:02 -08:00
Paul Vogel
b9d73afb63
Fix typo in messsage when deleting a database (#3777) 2021-12-04 10:24:06 -08:00
Alex
59d47e746b
fix: Forge version regex for 1.17+ JPMS (#3783)
For 1.17 JPMS arguments, fix regex to match`^1\.(17|18|19|20|21|22|23)` or latest instead of only dot . minor versions, which is something I didn't notice in a previous PR. This should future proof it.

Changes Java image display order defaulting to 17, which the 1.17+ requires for unix args.
2021-12-04 10:23:37 -08:00
Alex
01e7a45cc5
fix(eggs): Forge latest version fetching (#3770)
Fixes a typo in fetching the latest versions. It was overwritten to "recommended" by mistake.

Easy to read diff: <https://www.diffchecker.com/U04gJTRu>
2021-11-29 10:14:08 -08:00
Dane Everitt
30bb629bad
Update CHANGELOG.md 2021-11-16 20:36:53 -08:00
Dane Everitt
bf9cbe2c6d
Add consistent CSRF token verification to API endpoints; address security concern with non-CSRF protected endpoints 2021-11-16 20:02:18 -08:00
Matthew Penner
cc31a0a6d0
tests(integration): don't expect non-required fields 2021-11-15 11:29:22 -07:00
Alex
01871d8a6c
add Java 17 LTS image to Minecraft eggs (#3744)
* feat: add Java 17 LTS for Minecraft

* feat: add java 17 option to java modal
2021-11-15 08:15:27 -08:00
Dane Everitt
17c03e9a4d
Fix broken session management for application api 2021-11-03 21:33:21 -07:00
Dane Everitt
e8a8405899
Remove tests 2021-11-03 21:22:14 -07:00
Dane Everitt
60eff40a0c
Fix session management on client API requests; closes #3727
Versions of Pterodactyl prior to 1.6.3 used a different throttle pathway for
requests. That pathway found the current request user before continuing on to
other in-app middleware, thus the user was available downstream.

Changes introduced in 1.6.3 changed the throttler logic, therefore removing this
step. As a result, the client API could not always get the currently authenticated
user when cookies were used (aka, requests from the Panel UI, and not API directly).

This change corrects the logic to get the session setup correctly before falling
through to authenticating as a user using the API key. If a cookie is present and a
user is found as a result that session will be used. If an API key is provided it is
ignored when a cookie is also present.

In order to keep the API stateless any session created for an API request stemming
from an API key will have the associated session deleted at the end of the request,
and the 'Set-Cookies' header will be stripped from the response.
2021-11-03 20:51:39 -07:00
Alex
d0663dcbd4
fix: use POST for admin logout route (#3710)
Quick fix for logging out from the admin panel as the auth route was changed from GET to POST.
2021-10-30 13:27:59 -07:00
Alex
4dca4f0aa9
change display format of the container uptime (#3706)
* change display format of the container uptime

Display `day, hour, min` if days is more than 0, otherwise default to existing `hour, min, sec`. Removes pads to make it more clean in this new format.

* clean the return
2021-10-24 14:41:01 -07:00
Samuel Ryberg
c4ab318d5a
Update docker-compose.example.yml (#3707) 2021-10-24 10:21:58 -07:00
Alex
ef4410bac6
expose uptime to client resources API endpoint (#3705)
resolves #3704
2021-10-24 10:12:17 -07:00
Anders G. Jørgensen
72680fc954
Don't force enable-query (#3700)
But make sure the query.port is set correctly, if query is enabled.
2021-10-23 13:11:45 -07:00
Dane Everitt
d65e2978d0
Update CHANGELOG.md 2021-10-23 13:02:25 -07:00
Dane Everitt
45999ba4ee
(security) use POST for logout rather than GET
see https://github.com/pterodactyl/panel/security/advisories/GHSA-m49f-hcxp-6hm6
2021-10-23 13:00:21 -07:00
Dane Everitt
22a8b2b3a2
Use more standardized rate limiting in Laravel; apply limits to auth routes 2021-10-23 12:17:16 -07:00
Alex
f77932a617
cmd(upgrade): Attempt to gain users attention during upgrade (#3678)
* cmd(upgrade):  Attempt to gain users attention during upgrade

Changes color of the user and group to gain attention, common issue is having wrong user/group which breaks the panel. Outputs termination message when users spam enter skipping the upgrade wondering why it didn't upgrade.

Reminder to update wings, because users forget it.

* cmd(upgrade): Display wings upgrade documentation link
2021-10-10 11:08:22 -07:00
Alex
c12f1463b0
eggs(forge): Add support for 1.17+ Forge (#3676)
Support new 1.17+ Forge JPMS arguments that don't ship any executable jar. It will use unix_args.txt file for 1.17+ when one exists, otherwise defaults to using the jar file

Fix forge latest build version option to actually use latest instead of recommended
Set build version input rules to only accept valid values of the latest and recommended
Remove spaces from the version variables to avoid issues with curl. Forge site displays versions with spaces to end users
2021-10-10 10:50:01 -07:00
Alex
5b6de4df6f
eggs(rust): custom map url (#3625)
Introduces custom map URL variable. If none is provided, it will default to using normal map size and seed. Otherwise, it will use the custom map and remove map size/seed from the startup as required.
2021-10-09 10:31:47 -07:00
Waseem Hassan Shahid
8b236c6907
Fix SSL config docker (#3616)
* Don't copy default nginx config at build time

* Use http.d folder for nginx configs

* Add default config back

* Change the panel config name
2021-10-09 10:31:29 -07:00
Matthew Penner
4fa38b8e9c
Fix wings receiving wrong suspended status on sync (#3667)
Due to wings pulling the server configuration rather than the Panel pushing it,
wings gets the wrong status for a server if both the status update and sync request
are ran in a transaction due to the status not being persisted in the database.

Fixes #3639
2021-10-07 08:46:09 -07:00
Cyra
de0d5c9b8a
Updated CHS sponsor entry to use new domain (#3659)
Updated CHS sponsor entry to use new domain
Updated from captiolsolutions.cloud to chs.gg
2021-10-04 08:23:10 -07:00
Dane Everitt
81ba333270
If uptime is present in stats output, display it for the server; closes #3653 2021-10-03 12:59:44 -07:00
Dane Everitt
63e01f9aee
Update SECURITY.md 2021-10-02 08:21:04 -07:00
Dane Everitt
c57eb2c9e6
Update CHANGELOG.md 2021-09-21 21:36:29 -07:00
Dane Everitt
4a84c36009
Fix security vulnerability when authenticating a two-factor authentication token for a user
See associated security advisory for technical details on the content of this security fix.

GHSA ID: GHSA-5vfx-8w6m-h3v4
2021-09-21 21:30:08 -07:00
Dane Everitt
5fdb0a5909
Correctly expose OOM disable state for a server 2021-09-13 21:02:12 -07:00
Dane Everitt
f5a1ce13b8
Update CHANGELOG.md 2021-09-13 20:47:30 -07:00
Matthew Penner
bc25468802
server: fix build modification not being persisted (#3610) 2021-09-12 23:18:17 -06:00
Dane Everitt
dbb061d6f3
Update CHANGELOG.md 2021-09-12 11:26:37 -07:00
Dane Everitt
8f0eda21c5
Fix all screens on the panel unintentionally loading the root directory for a server 2021-09-11 14:17:20 -07:00
Dane Everitt
52588beeb0
Fix state management of overrides not properly resetting loader; closes #3429 2021-09-11 13:24:57 -07:00
Dane Everitt
7b429831ce
Fix missing user agent headers to store an empty string rather than null value 2021-09-11 13:00:53 -07:00
Boy132
5e5d7d6689
Update egg-garrys-mod.json (#3606)
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2021-09-11 12:20:15 -07:00
Matthew Penner
4d7140bd3b
actions(tests): backport v2 workflow (#3558)
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2021-09-11 12:20:04 -07:00
Dane Everitt
0b521c011f
Fix test workflow matrix for databases 2021-09-11 12:13:15 -07:00
Dane Everitt
db74b0024d
Merge branch 'develop' of github.com:pterodactyl/panel into develop 2021-09-11 12:02:24 -07:00
Dane Everitt
fde0660e6c
Return tests to passing state 2021-09-11 12:02:15 -07:00
Alex
a775f3ccf2
egg(ark): Fix inverted OR operation (#3605) 2021-09-11 11:45:48 -07:00
Dane Everitt
e96ead4c4d
Update API calls to Wings to only pass the required details with the changes to the installer system 2021-08-29 14:09:43 -07:00
Dane Everitt
869bc22103
Update CHANGELOG.md 2021-08-29 13:42:49 -07:00
Dane Everitt
2d47f986ee
Replace calls to server patch with a manual sync method 2021-08-29 13:32:55 -07:00
Dane Everitt
d8d1eacb42
Don't require Wings API call to pass in order to update server details 2021-08-29 13:19:24 -07:00
Matthew Penner
7330a747b7
migrations: add foreign keys for mount relations (#3574) 2021-08-24 13:12:35 -06:00
Josh Miles
bd271e2e62
Consistency in Java version modal (#3569) 2021-08-24 12:42:58 -06:00
Alex
e1a667aaaf
Disable blank issues (#3566) 2021-08-24 11:35:30 -06:00
Omar Kamel
b67aceb685
Add environment variable for per_schedule_task_limit (#3557)
The environment variable `PTERODACTYL_PER_SCHEDULE_TASK_LIMIT` can be used to change the maximum number of tasks per schedule.
2021-08-20 11:07:05 -06:00
Matthew Penner
b4cae916ac
transfers: fix allocation array merging logic (#3551) 2021-08-18 12:58:41 -06:00
Alex
b94d69bbab
Introduce OOM Killer to Server Creation (#3548) 2021-08-18 12:32:45 -06:00
Cam White
5d41ac09fd
Grammatical fix on SetupTwoFactorModal (#3549) 2021-08-18 11:48:06 -06:00
Dane Everitt
ddf43bb4c5
Update README.md 2021-08-15 18:32:40 -07:00
Dane Everitt
2b3303c46b
Fix changing a user password to not incorrectly handle logging out old sessions; closes #3531 2021-08-15 17:37:12 -07:00
Dane Everitt
25d9ba4779
Run php-cs-fixer 2021-08-15 17:20:36 -07:00
Dane Everitt
d1199e59e6
Fix php-cs-fixer inspection in phpstorm 2021-08-15 17:15:05 -07:00
Dane Everitt
22f1341fea
reformat 2021-08-07 09:19:21 -07:00
Dane Everitt
75e0a862e7
Add another sanity check for websocket permissions 2021-08-07 09:16:29 -07:00
Dane Everitt
9bffa6a94c
Ignore files from V2 as well 2021-08-07 08:46:30 -07:00
Matthew Penner
10b357b71e
ui(server): fix used backup count (#3526)
* ui(server): fix used backup count

* ui(server): refactor backup count code
2021-08-04 20:34:00 -07:00
Matthew Penner
7e91a33a67
Update CHANGELOG.md (#3524) 2021-08-03 20:51:18 -07:00
Matthew Penner
49c24b9c4c
Merge pull request #3523 from parkervcp/fix_dockerfile
fix ghcr builds
2021-08-03 21:37:23 -06:00
Michael Parker
94fd987400 fix ghcr builds
Fix nginx conf file location
Fix php-fpm conf file location
2021-08-03 23:33:25 -04:00
Charles Morgan
0074c84001
Add javaversion to java eggs. (#3518)
Co-authored-by: Matthew Penner <me@matthewp.io>
2021-08-03 20:11:45 -07:00
Matthew Penner
81c788f524
cmd(upgrade): fix force and seed flags being ignored (#3519) 2021-08-03 19:48:34 -07:00
Matthew Penner
1c071b05aa
ui: fix spinner z-index (#3520) 2021-08-03 19:46:00 -07:00
Matthew Penner
970f281859
backups: default is_successful to false (#3522)
* backups: default is_successful to false
* backups: properly query backups
2021-08-03 19:45:25 -07:00
Dane Everitt
b19a1640f0
Update CHANGELOG.md 2021-08-02 20:48:16 -07:00
Dane Everitt
4960bc7eec
Merge branch 'develop' of github.com:pterodactyl/panel into develop 2021-08-02 20:45:04 -07:00
Matthew Hugley
cfb5b8c244
Updated formatting for the docker compose file to fix a error. (#3421)
This fixes the error message "There is an error in the yaml syntax: YAMLSemanticError: Map keys must be unique; "<<" is repeated" which is received if trying to deploy the docker compose using portainer it will not even allow you to click the button because of the formatting error. This is a page showing a example of what I did "http://yaml.org/type/merge.html" Instead of 2 merge requests docker/portainer only allows 1 merge request in this situation so they had to be combined into 1 line instead of 2.
2021-08-02 20:44:55 -07:00
Mia
bda1ff50ab
[UI] Display the 2FA token, show spinner on load (#3367)
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2021-08-02 20:39:12 -07:00
Charles Morgan
924f00ac9a
Java Docker image updater feature (#3430)
Co-Authored-By: Lance Pioch <me@lance.sh>
2021-08-02 20:32:10 -07:00
Linux123123
9c64fb29a4
Fix ScheduleEdit page not working directly by url (#3477) 2021-08-02 20:07:39 -07:00
Triassic
e8746feb97
Fix a typo in DisableTwoFactorModal.tsx (#3507) 2021-08-02 20:07:26 -07:00
VibeGAMESNL
208a547a2a
Adding VibeGAMES as a sponsor (#3504) 2021-08-02 20:06:33 -07:00
Faye
a78404fdbe
Update SECURITY.md (#3483) 2021-08-02 20:05:27 -07:00
Alex
556deedcc1
fix: enable editing paper and spongeforge version variable input (#3509)
Changes the paper and spongeforge version variable to be editable by users on the client view. There is no reason to have it as read-only. Other eggs have this value as editable
2021-08-02 20:04:23 -07:00
Alex
ba18f7d3c6
Update Ark Survival Evolved Egg (#3513)
Updates Ark Survival Evolved egg to fix some common issues and requests.

RCON Password is required for RCON to function and has been changed from nullable to required.

The option to disable RCON is removed because RCON is required.

Added additional arguments variable to resolve users' issues inserting them in the wrong place due to the complicated startup parameters.

Removed deprecated userInteraction and logslocation from the egg.
2021-08-02 20:04:13 -07:00
Alex
2bbe58e8ec
fix: paper server jar input rule (#3494)
Changes Paper egg server jar variable input rule to match the other Minecraft eggs. Matches `a-zA-Z0-9_` and `.jar` at the end instead of hard-coded length value of 20.

Fixes #3492
2021-07-24 10:14:51 -07:00
Alex
e1d2a931b6
style(templates): Default title tag for issue templates (#3488) 2021-07-23 14:36:48 -07:00
Matthew Penner
1a79b4827c
backups: allow updating a failed backup (#3470) 2021-07-18 08:46:20 -07:00
Dane Everitt
4a4af7deb7
Update bug report and feature request templates 2021-07-17 10:26:06 -07:00
Foks
0b6236aa2a
Convert from Markdown to Issues Forms (#3457) 2021-07-17 10:04:27 -07:00
Charles Morgan
c54ce995a5
Remove userInteraction from 'config_startup' (#3465)
Removes UserInteraction from existing eggs in the panel, as its no longer supported.
2021-07-17 10:02:58 -07:00
Linux123123
2c2c35303a
Fix backup dropdown permissions (#3469) 2021-07-17 10:02:37 -07:00
ClumsyAdmin
57987c0f79
Update Allocation.php (#3468)
Max port typo
2021-07-17 10:02:15 -07:00
Charles Morgan
91ea0a4f41
Update core eggs to new docker yolk images (#3382) 2021-07-17 10:02:00 -07:00
Leystryku
298e985d74
Permission for referencing other tables (foreign keys) (#3419) 2021-07-17 10:01:37 -07:00
Matthew Penner
801cb8e487
config: add ssl/tls options for mysql and redis (#3464) 2021-07-17 10:01:23 -07:00
Dane Everitt
682ca6cecd
Merge branch 'develop' of github.com:pterodactyl/panel into develop 2021-07-11 12:15:42 -07:00
Dane Everitt
d3e3b1db38
Test that a deleted backup makes an audit log entry 2021-07-11 12:15:39 -07:00
Alex
ca2269fea1
Fix z-index of the mass delete modal (#3463)
Fixes the order of mass confirmation modal to correctly be displayed prominently on top of all elements
2021-07-11 11:27:52 -07:00
Matthew Penner
d33522c857
composer: upgrade dependencies (#3427) 2021-07-11 10:27:15 -07:00
Matthew Penner
1260965dfd
ServerCreationService: send 'start_on_completion' option to wings (#3431) 2021-07-04 15:15:19 -07:00
iamkubi
cc05b0886b
Fix CPU tooltip on server create page (#3416)
CPU usage is based on threads, however the create server page incorrectly specifies physical cores in the help text.
Relocate a BlockIO blurb at the end of the CPU usage text which seems to be in the wrong place.
2021-06-19 12:10:02 -07:00
Dane Everitt
d049839ffc
Fix deleting a backup that is locked and failed; closes #3404 2021-06-13 10:26:47 -07:00
Fabian
725fc82657
fix eslint issues (#3410) 2021-06-12 10:46:10 -07:00
Alex
76fb8d26c1
patch: steamapps hotfix for steamcmd downloads (#3406)
* patch: steamapps hotfix for steamcmd downloads

* include new ark gen2 dlc map
2021-06-11 16:11:07 -07:00
Dane Everitt
aa3ea8b24b
Update CHANGELOG.md 2021-06-05 09:02:21 -07:00
Mark Ross
d45c67a6e1
Allow to find servers by short UUID (Application API) (#3340) 2021-06-05 08:43:57 -07:00
Alex
e33b1792b1
Show CPU limit next to CPU usage (#3307) 2021-06-05 08:40:48 -07:00
Jakob
647d2cbf92
add scroll down helper to console (#2951) 2021-06-05 08:39:36 -07:00
Lukas
75d254a6a4
Add support for mailgun API endpoint (#3364) 2021-06-05 08:38:47 -07:00
notil
b79d6e9e64
Minor UI fixes (#3366)
* Added same spacing as CPU graph to RAM graph
* Have the "New Database" button be on the right when on mobile
2021-06-05 08:38:24 -07:00
Charles Morgan
482293578a
Update eslint to latest verstions (#3380)
Updated Eslint to v7.27.0
Also updated all the related plugins to their latest versions.

Removed `eslint-plugin-standard`, no longer required with `eslint-config-standard` v16+   https://github.com/standard/standard/issues/1316
2021-06-05 08:37:44 -07:00
Stephen White
8459b11019
Allow database users to create/alter/drop routines (#3389)
Database users may wish to create/alter/drop stored procedures on their databases in order to use extra MySQL functionality.
2021-06-05 08:37:10 -07:00
Jelco
b3a1825b56
Fix server delete swal (#3391) 2021-06-05 08:36:59 -07:00
Alex
9656378783
Fix 401 error typo (#3393) 2021-06-03 13:35:51 -07:00
Dane Everitt
2fd16f441d
Fix component stack depth crashes due to looping setState 2021-05-29 10:58:24 -07:00
Matthew Penner
c5b6d0bf45
Fix query to avoid pruning actively running backups (#3379) 2021-05-27 15:33:43 -07:00
Dane Everitt
010ef8621b
[security]: remove external dependency for loading QR codes for 2FA 2021-05-16 12:45:04 -07:00
Dane Everitt
1f64086c67
Merge branch 'develop' of github.com:pterodactyl/panel into develop 2021-05-16 12:35:52 -07:00
Dane Everitt
6b16b9bc2a
Cleanup logic for asModal to make it a little easier to use dynamically 2021-05-16 12:35:49 -07:00
Charles Morgan
3898e40fa4
Add list of files being deleted to delete modal (#3299)
Shows the first 15 file names being deleted. If more then 15, the first 15 will be shown then the last line will be ` + ## other(s)`
2021-05-16 11:28:52 -07:00
Alex
bd5472e2e6
Update voice server eggs (#3333)
* Remove numeric input rule from mumble

* Delete unnecessary file removal line
2021-05-16 11:27:55 -07:00
Charles Morgan
69ac2ca40b
Allow MAB div to be clicked through (#3359)
Allows users to interact with files that are blocked by the div that renders the MassActionbar
2021-05-16 09:49:21 -07:00
Antony
9c3c5f6f71
Fixed a very small minor issue (#3360) 2021-05-16 09:48:55 -07:00
Charles Morgan
76ac1998cf
Don't allow backups to be made via schedules if limit = 0 (#3323) 2021-05-16 09:47:36 -07:00
Dane Everitt
5a82dd6a18
Update to TypeScript 4 2021-05-08 10:37:18 -07:00
aussieserverhosts
0cd1362b05
Added Aussie Server Hosts to sponsors list (#3336) 2021-05-07 08:18:13 -07:00
Dane Everitt
5d5e4ca7b1
Add support for locking backups to prevent any accidental deletions 2021-05-03 21:26:09 -07:00
Dane Everitt
5f48712c28
Add test coverage for RunTaskJob 2021-05-01 12:24:42 -07:00
Dane Everitt
8ab3ad3f1a
Update CHANGELOG.md 2021-05-01 11:54:23 -07:00
Dane Everitt
7a85c31553
Add internal code support for stopping tasks if server is not running or continuing through on task error 2021-05-01 11:52:02 -07:00
Dane Everitt
84483d36ee
Fix use of onlyWhenOnline 2021-05-01 11:25:35 -07:00
Dane Everitt
ea057cb1cb
Update UI to support setting "Continue on Error" for tasks 2021-05-01 11:24:18 -07:00
Dane Everitt
92cd659db3
Add underlying data changes necessary for new task & schedule features 2021-05-01 10:44:40 -07:00
Dane Everitt
cf1ac04e39
Merge pull request #3279 from Boy132/patch-1
Add group input to upgrade command
2021-04-25 11:06:34 -07:00
Dane Everitt
fd8259f33d
Merge branch 'develop' into patch-1 2021-04-25 11:06:29 -07:00
Dane Everitt
4bd1fea52c
Merge pull request #3292 from JulienTant/develop
Make it possible to manually run disable schedule
2021-04-25 11:06:18 -07:00
Julien Tant
b10f6184e0 remove the test preventing disabled schedule to be manually executed 2021-04-24 18:30:48 -07:00
Julien Tant
f7f972b33d rename now variable & fix condition 2021-04-24 18:18:29 -07:00
Julien Tant
2cd64c0af4 Merge remote-tracking branch 'upstream/develop' into develop 2021-04-24 17:14:18 -07:00
Dane Everitt
d0c7e2c0e6
Update CHANGELOG.md 2021-04-24 16:45:54 -07:00
Dane Everitt
30344c1339
Merge branch 'develop' of github.com:pterodactyl/panel into develop 2021-04-24 16:39:59 -07:00
Dane Everitt
6ef60633d3
Additional coverage to ensure values are wrapped as expected; ref #3287 2021-04-24 16:39:56 -07:00
Dane Everitt
257f7a293a
Merge branch 'develop' into patch-1 2021-04-24 16:13:20 -07:00
Julien Tant
552b9d3c33 Add possibility to run disabled cron 2021-04-24 15:06:21 -07:00
Dane Everitt
2fc288e53a
Merge pull request #3285 from Software-Noob/patch-4
Update forge download URL to match the new maven host
2021-04-22 08:22:33 -07:00
Alex
3858ca0807
fix download url 2021-04-22 00:11:45 +03:00
Dane Everitt
38a5f2dbbf
Ensure allocations are persisted across page navigation correctly; closes #2729 2021-04-20 20:48:40 -07:00
Dane Everitt
d2955b9361
Only request servers as an admin if actually an admin; closes #3242 2021-04-20 20:41:08 -07:00
Peter Marheine
db64f54010
Drop explicit transaction from store_node_tokens_as_encrypted_value (#3280)
Migrations are executed in transactions anyway, and creating a savepoint can cause
spurious failures on databases that don't support transactional DDL (like
MySQL and MariaDB) when it attempts to commit a savepoint that was silently
not created because there wasn't an active transaction after some DDL was
executed.

While a better solution might involve splitting this migration into several so each
one is only DDL or only data manipulation, I don't think that can be done very
easily while maintaining compatibility with existing deployments.

Fixes #3229.
2021-04-20 20:37:11 -07:00
Boy132
c56e699985
Separated user from group 2021-04-20 17:39:34 +02:00
Boy132
2f6351ec00
Small fix 2021-04-20 10:08:21 +02:00
Boy132
3ca835e661
Add group input to upgrade command 2021-04-20 10:06:19 +02:00
Charles Morgan
b0995f6458
Update ---bug-report.md (#3272)
Spelling correction, Removed code block as they're useless...
2021-04-18 10:47:12 -07:00
Charles Morgan
2d97b51628
Update issue template (#3271)
Daemon was replaced with Wings, template updated to reflect that, Also askes for logs as they can be helpful, and reduce the amount of times we have to ask and wait for a reply.
2021-04-17 15:57:37 -07:00
Alex
38be4c9e4b
More descriptive error for when backup limit is 0 (#3244) 2021-04-17 14:05:31 -07:00
aussieserverhosts
eb582f51f1
Added SERVER_NAME environment variable (#3110)
Added SERVER_NAME environment variable to stop laravel framework server name defaulting to localhost, causing mail relays such as Gmail to stop silently dropping emails due to sender name being localhost.
2021-04-17 12:18:13 -07:00
Dane Everitt
1e2f6495be
Merge pull request #3226 from KaiDevrim/patch-1
Change relative docker compose to absolute path docker-compose
2021-04-17 12:16:57 -07:00
Dane Everitt
2ea5fc2e84
Merge pull request #3220 from Software-Noob/patch-2
Increase Rust server name length
2021-04-17 12:16:42 -07:00
Dane Everitt
7af08b1a39
Merge pull request #3243 from wingdings255/patch-1
Update egg-ark--survival-evolved.json
2021-04-17 12:16:33 -07:00
Dane Everitt
af3fb14254
Merge pull request #3256 from pterodactyl/lancepioch-patch-1
Change to actual function names to support MariaDB
2021-04-17 12:16:03 -07:00
Dane Everitt
ea7b0a1a67
Merge branch 'develop' into lancepioch-patch-1 2021-04-17 12:12:10 -07:00
Dane Everitt
e2e62b2dae
Update tests.yml 2021-04-17 12:12:04 -07:00
Dane Everitt
a139fbfc8d
Merge branch 'develop' into lancepioch-patch-1 2021-04-17 12:10:55 -07:00
Dane Everitt
1ebcb2b7fb
Run tests on both MariaDB & MySQL 2021-04-17 12:10:40 -07:00
Dane Everitt
13919df603
Merge branch 'develop' into lancepioch-patch-1 2021-04-17 12:02:19 -07:00
Dane Everitt
f5ca391400
Get tests back in working order 2021-04-17 12:02:08 -07:00
Lance Pioch
77a3ca682f
Change to actual function names to support MariaDB 2021-04-08 17:34:25 -04:00
Dane Everitt
f973285e04
Guard against unexpected panic conditions from wings 2021-04-04 10:45:33 -07:00
Dane Everitt
18e5ce310a
Use updated response from wings 2021-04-04 10:25:54 -07:00
Dane Everitt
52308af74d
Normalize this code. 2021-04-04 09:45:20 -07:00
Dane Everitt
c71c1e57db
Update README.md 2021-04-03 11:18:16 -07:00
Dane Everitt
45680cab47
Don't use tagging, closes #3224 2021-04-03 10:53:41 -07:00
wingdings255
acc4395b53
Merge branch 'develop' into patch-1 2021-04-03 07:22:26 +00:00
Dane Everitt
a7b60c0f52
Merge pull request #3245 from harryfrommixmlhosting/patch-2 2021-04-02 18:18:30 -07:00
harryfrommixmlhosting
6034440061
Update README.md 2021-04-03 02:17:25 +01:00
Dane Everitt
da7e0705ba
Merge pull request #3225 from MineDoubleSpace/add-bisecthosting 2021-04-02 18:12:42 -07:00
Dane Everitt
5b84372843
Merge branch 'develop' into add-bisecthosting 2021-04-02 18:12:39 -07:00
wingdings255
95f26bd0c4
Update egg-ark--survival-evolved.json
Updated the list of available ark maps to include the new CrystalIsles map
2021-04-01 20:19:23 +00:00
Dane Everitt
fa471c1a69
Merge pull request #3230 from tari/docker-errexit
docker: set errexit in the entrypoint script
2021-03-29 08:21:27 -07:00
Peter Marheine
9e4286a548
docker: set errexit in the entrypoint script
Currently container startup will ignore any errors, which will tend
to leave things in a broken state if operations like migrations or
certificate provisioning fail. Prefer to terminate the container
rather than try to limp on.
2021-03-28 12:38:25 +11:00
Kai Devrim
58d31fdd4a
Change relative docker compose to absolute path docker-compose
The old version was relative and led to a 404 because the compose file is in /panel.
2021-03-26 21:27:18 -07:00
MineDoubleSpace
fe8136de22 add BisectHosting to readme 2021-03-27 16:41:14 +13:00
Dane Everitt
9a5486c0aa
Cleanup and improve build docs 2021-03-26 09:50:46 -07:00
Dane Everitt
a072b9c5be
Update license year, right on time 👹 2021-03-26 09:30:13 -07:00
Dane Everitt
b5f5185a9b
Update CHANGELOG.md 2021-03-26 09:18:54 -07:00
Dane Everitt
48ad8f538e
Always allow specifying a page size with the API; closes #3218 2021-03-26 09:03:51 -07:00
Alex
06fe47fc3c
increase short limit 2021-03-25 00:03:39 +02:00
Dane Everitt
9b46d59045
Cache resource lookup results for 20 seconds for each server 2021-03-21 12:29:18 -07:00
Dane Everitt
c7375f09d3
Maybe fix issue with docker logs? ref #3045 2021-03-21 12:11:40 -07:00
Dane Everitt
29b4b52397
Set the current page in the dashboard URL to allow easy refreshing; closes #2993 2021-03-21 12:07:24 -07:00
Dane Everitt
7676f7dd66
Allow modification of server build settings even when node is offline 2021-03-21 11:49:42 -07:00
Dane Everitt
28148f4845
Don't force enable bungeecord query port; closes #3175 2021-03-21 10:53:27 -07:00
Dane Everitt
aa0b7977bb
Fix error spam in logs due to missing cron month 2021-03-21 10:49:23 -07:00
Dane Everitt
8c7d785c9e
Ensure a created_at value is set on recovery tokens; closes #3163 2021-03-21 10:43:01 -07:00
Dane Everitt
983a337fd4
Merge branch 'develop' of github.com:pterodactyl/panel into develop 2021-03-21 10:33:17 -07:00
Dane Everitt
a7e1900529
Fix UI for mobile views when showing docker images; closes #3186 2021-03-21 10:33:09 -07:00
Dane Everitt
84e3153e71
Merge pull request #3179 from pterodactyl/fix/backup-restore
fix: backup restore delete all files
2021-03-21 10:22:10 -07:00
Dane Everitt
62c08d17fb
Merge pull request #3204 from iAtomPlaza/develop
typo
2021-03-21 09:56:45 -07:00
Dane Everitt
14c5db0c0c
Merge pull request #3201 from ssh-sysadmin/patch-1
Change ByteAnia's link to a tracker-enabled one.
2021-03-21 09:56:02 -07:00
Steve Coulter
0e3d2f20dd
typo 2021-03-20 17:03:30 -07:00
Samuel L
d34e374ce0
Change ByteAnia's link to a tracker-enabled one. 2021-03-20 03:40:20 -04:00
Dane Everitt
0b7151a306
Merge pull request #3200 from martmists-gh/develop
Add a message for users to apply different versions
2021-03-19 15:55:49 -07:00
Martmists
6a664bc479 Add a message for users to apply different versions 2021-03-19 23:45:44 +01:00
Dane Everitt
942136cb35
Merge pull request #3195 from pterodactyl/fix/console-copy
ui(server): fix keybinds not working in console
2021-03-18 08:22:09 -07:00
Matthew Penner
9057a4f9d8 ui(server): fix keybinds not working in console 2021-03-17 16:59:06 -06:00
Dane Everitt
1b3d1a4540
Merge pull request #3190 from Software-Noob/patch-1
Fix forge universal jar renaming
2021-03-15 12:57:26 -07:00
Alex
3358bea09f
Fix universal jar renaming 2021-03-15 18:07:30 +02:00
Matthew Penner
5653b03ddb cleanup BackupContextMenu.tsx 2021-03-12 15:40:45 -07:00
Matthew Penner
582521f419 fix: backup restore delete all files 2021-03-12 14:47:49 -07:00
Dane Everitt
c8c9c3d3cb
Merge pull request #3162 from Software-Noob/tar-patch
Fix artisan upgrade failing to download
2021-03-08 10:10:52 -08:00
Alex
76f507656c
remove file archive flag 2021-03-08 12:19:20 +02:00
Dane Everitt
9d500f1c49
Update CHANGELOG.md 2021-03-07 17:38:42 -08:00
Dane Everitt
1476104b30
Fix inability to download files from the panel; closes #3151
Co-Authored-By: xcgc <74693042+xcgc@users.noreply.github.com>
2021-03-07 09:45:27 -08:00
Dane Everitt
7e0efbdecd
Merge pull request #3148 from mammut53/develop
Fix displaying wrong backup number on pages
2021-03-06 19:15:26 -08:00
mammut53
8dca2140b3
Fix displaying wrong backup number on pages
By having multiplie pages the current number of backups broke
2021-03-07 01:57:02 +01:00
Dane Everitt
0baa74a517
Fix rust not seeding 2021-03-06 12:29:40 -08:00
Dane Everitt
ca6068fa6d
Update CHANGELOG.md 2021-03-06 10:49:08 -08:00
Dane Everitt
5fa06e5672
Merge pull request #3144 from Sabinno/develop
Fix grammar
2021-03-06 10:45:47 -08:00
Dane Everitt
37d48c9972
Merge pull request #3146 from xcgc/patch-1
Inform users when their server successfully installed. Fixes #3140
2021-03-06 10:45:23 -08:00
xcgc
397df3bf71
Update ServerInstallController.php 2021-03-06 15:52:24 +08:00
Sabinno
9ca0ee99e9
Fix spelling
Changed "other's", implying a single other person's server, to "others'", implying the servers of multiple people.
2021-03-05 12:39:47 -05:00
Dane Everitt
4192bcab4b
Update CHANGELOG.md 2021-03-03 21:17:20 -08:00
Dane Everitt
766a8f3fe8
Merge branch 'develop' of https://github.com/pterodactyl/panel into develop 2021-03-03 21:04:17 -08:00
Dane Everitt
9aa74a3a50
appease the eslint gods 2021-03-03 21:04:11 -08:00
Dane Everitt
94ad018e50
Merge pull request #3132 from ssh-sysadmin/develop
Add ByteAnia to Sponsors list
2021-03-03 21:03:03 -08:00
Dane Everitt
2edae052d8
Merge pull request #3138 from Software-Noob/patch-3
Fix ark rcon startup
2021-03-03 21:02:54 -08:00
Dane Everitt
1943c7a98b
Prevent catastrophic boot failure in wings when a server egg has bad data; closes #3055 2021-03-03 21:02:11 -08:00
Alex
0723e6e3c1
Fix ark rcon startup 2021-03-04 06:41:10 +02:00
Dane Everitt
19279644df
Show more user friendly error when allocation fails to parse; closes #3056 2021-03-03 20:19:00 -08:00
Dane Everitt
9a10078008
Delete Vagrantfile 2021-03-03 20:18:24 -08:00
Dane Everitt
68bc81f2f1
Try to handle terminal fit a bit better; closes #3121
I'm not sure how to fix this actually, but based on the light reading I did theoretically this should at least prevent it from trying to fit something that doesn't even exist?
2021-03-03 19:44:06 -08:00
Dane Everitt
bc87a9cf7d
Don't break the entire server UI for a broken console, ref #3121 2021-03-03 19:31:39 -08:00
Samuel L
d86bcb50af
Update README.md 2021-03-02 07:14:35 -05:00
Dane Everitt
f58db890df
Update SECURITY.md 2021-02-24 20:44:08 -08:00
Dane Everitt
7d0f299b30
Fix sftp port being signed int; closes #2992 2021-02-23 21:28:33 -08:00
Dane Everitt
1b2c4931ee
Add endpoint logic necessary to reset server states if they get stuck installing/restoring when wings restarts 2021-02-23 21:20:02 -08:00
Dane Everitt
3b60004392
Merge pull request #3114 from Software-Noob/patch-2 2021-02-23 06:46:38 -08:00
Dane Everitt
25fe9c10e0
Merge branch 'develop' into patch-2 2021-02-23 06:46:21 -08:00
Dane Everitt
7f981e9ade
Merge pull request #3119 from pterodactyl/revert-3116-patch-2
Revert "2021_02_23_161404_UpdateDaemonSftp.php"
2021-02-23 06:45:37 -08:00
Dane Everitt
717fbf30d2
Revert "2021_02_23_161404_UpdateDaemonSftp.php" 2021-02-23 06:45:21 -08:00
Dane Everitt
06108b560e
Merge pull request #3116 from VinGal0/patch-2
2021_02_23_161404_UpdateDaemonSftp.php
2021-02-22 21:14:53 -08:00
VinGal
5328cfd760
2021_02_23_161404_UpdateDaemonSftp.php
Migration File for DaemonSFTP
2021-02-23 01:13:46 +00:00
Dane Everitt
ef76f3cdca
Merge pull request #3112 from Software-Noob/patch-1
Change Rust RCON Password input rule
2021-02-22 11:30:48 -08:00
Alex
03a14338d0
update regex rule 2021-02-22 20:46:56 +02:00
Alex
e636f69113
Fix server.jar renaming 2021-02-22 17:09:46 +02:00
Alex
d0afb29ae8
Change input rule 2021-02-22 15:47:34 +02:00
Dane Everitt
42aae1d9f1
Fix search/copy on osx 2021-02-17 21:32:36 -08:00
Dane Everitt
b92712e990
Remove max height; fixes overflow issues with small browser font sizes; closes #2799 closes #3084 2021-02-17 21:26:40 -08:00
Dane Everitt
94ea9c37d0
Don't require auto-allocation settings if not enabled; closes #3085 2021-02-17 21:11:23 -08:00
Dane Everitt
245989967b
Merge branch 'dane/restore-backups' into develop 2021-02-17 20:59:40 -08:00
Dane Everitt
3171b8d559
Show correct server suspended image; closes #3092 2021-02-17 20:58:47 -08:00
Dane Everitt
6cee1084d6
Merge pull request #3087 from TekExplorer/update/vanilla-snapshot
Add Latest Snapshot to Vanilla Egg
2021-02-14 16:05:35 -08:00
Dane Everitt
fc6f3271a0
Merge pull request #3089 from WaffleThief123/develop
Adding CHS to readme as well as some typos
2021-02-11 14:37:16 -08:00
Cyra Westmere
d67cd5f221 Minor grammatical change to Spillhosting.no 2021-02-11 13:44:35 -08:00
Cyra Westmere
c9ebbf161e Rewrote CHS after talking to the team. 2021-02-11 13:36:53 -08:00
Cyra Westmere
deaeb3fa99 Fixed a typo on Line 10 "in isolated Docker container" -> "in isolated
Docker conatiners"
Fixed a typo in SpillHosting's Company: "which aims to cheap services" ->
"which aims for cheap services"
Added CHS to sponsors
2021-02-11 13:29:33 -08:00
Omar Kamel
d644387a33
remove unecessary bit 2021-02-10 17:07:43 -05:00
TekExplorer
48adca2c00 Add Latest Snapshot to Vanilla Egg 2021-02-10 20:53:17 +00:00
Dane Everitt
9af1b9c3ac
Merge pull request #3072 from pterodactyl/matthewpi/fix-server-installs
api(remote): fix inproper reading of boolean for installation status
2021-02-08 10:04:45 -08:00
Matthew Penner
352910f897 api(remote): fix inproper reading of boolean for installation status 2021-02-06 10:16:08 -07:00
Dane Everitt
00da092e45
Fix tests 2021-01-30 19:12:22 -08:00
Dane Everitt
2f08456ed9
Merge branch 'dane/restore-backups' into develop 2021-01-30 18:51:16 -08:00
Dane Everitt
c8ecbe6e79
Update logic to listen for a restoration completion event 2021-01-30 18:43:46 -08:00
Dane Everitt
f558bc880a
Correctly handle error; don't overwrite laravel method 2021-01-30 18:07:48 -08:00
Dane Everitt
32fb21d0b7
Update use of server error blocks 2021-01-30 18:01:32 -08:00
Dane Everitt
e30a765071
Simplify logic when a server is in an unsupported state 2021-01-30 13:28:31 -08:00
Dane Everitt
be26921fcc
Merge branch 'develop' into dane/restore-backups 2021-01-30 10:10:29 -08:00
Dane Everitt
8c2d1cdffc
Merge pull request #3050 from pterodactyl/fix/release-building
actions(release): copy .babel-plugin-macrosrc.js to release archive
2021-01-28 21:10:49 -08:00
Matthew Penner
6c2dcbce9c actions(release): copy .babel-plugin-macrosrc.js to release archive 2021-01-28 16:47:37 -07:00
Dane Everitt
5515871b2f
Turns out I hate that huge space formatting, disable that mess 2021-01-27 20:52:11 -08:00
Dane Everitt
0ae90eacaa
Don't try to store null values in the DB for variables; closes #3038 2021-01-27 20:45:26 -08:00
YinScape
8e7fcb484c
Update "not viable" message to be more informative (#2987) 2021-01-26 21:13:13 -08:00
Charles Morgan
b8db5bc8b0
Allow copy on click for SFTP information (#3027) 2021-01-26 21:10:30 -08:00
Dane Everitt
25f656116a
Merge pull request #3031 from Software-Noob/patch/rust_egg
Rust+ app support
2021-01-26 21:10:12 -08:00
Dane Everitt
b00def2537
Switch to JSON from TEXT when storing denylist items for an egg; closes #3034 2021-01-26 21:08:53 -08:00
Dane Everitt
0dd0f09238
Formatting cleanup for backups 2021-01-25 19:25:15 -08:00
Dane Everitt
0a2c89e9f4
Reeformat with new rules post merge 2021-01-25 19:20:51 -08:00
Dane Everitt
663143de0b
Merge branch 'develop' into dane/restore-backups 2021-01-25 19:16:40 -08:00
Softwarenoob
dc5cf9ced5 Rust+ app support 2021-01-25 08:03:24 +02:00
Dane Everitt
b7d1c45bcc
Merge pull request #3028 from zKoz210/patch-6
Fixed tests
2021-01-24 10:16:30 -08:00
Oreo Oreoniv
09078bc1d2
Fixed tests 2021-01-24 13:12:40 +03:00
Dane Everitt
d838ddb006
Merge branch 'dane/self-update' into develop 2021-01-23 16:33:41 -08:00
Dane Everitt
bf2291357f
Just stop people right there. 2021-01-23 16:32:43 -08:00
Dane Everitt
2a8d336336
Ensure slow commands have time to run 2021-01-23 16:29:18 -08:00
Dane Everitt
fd9245b2c5
Make sure we chown the files at the end of the process 2021-01-23 16:27:23 -08:00
Dane Everitt
db5c9b3675
Allow specification of a version 2021-01-23 16:12:13 -08:00
Dane Everitt
fb98b1892d
Add simple logic to download and unpack the archive 2021-01-23 16:07:49 -08:00
Dane Everitt
6f3ea462a7
Add command to execute all of the normal upgrade commands for the application 2021-01-23 15:52:57 -08:00
Dane Everitt
fa9431c54d
Slightly cleanup 2021-01-23 14:12:15 -08:00
Dane Everitt
07798b7366
Update file contents 2021-01-23 13:59:52 -08:00
Dane Everitt
b480a9e4e2
Make php-cs-fixer work in phpstorm 2021-01-23 13:44:35 -08:00
Dane Everitt
91cdf08489
Update .php_cs.dist 2021-01-23 13:37:07 -08:00
Dane Everitt
29e0bebc73
Allow composer to run in local environments even without DB 2021-01-23 13:27:20 -08:00
Dane Everitt
c449ca5155
Use more standardized phpcs 2021-01-23 12:33:34 -08: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
028921b42a
Merge pull request #2985 from pterodactyl/fix/docker-build-version
Properly add the version to Docker builds
2021-01-20 21:33:51 -08:00
Dane Everitt
8df44b3280
Merge pull request #2997 from gOOvER/ts3-query-fix
Teamspeak 3 Egg - added queryport and use default query port
2021-01-20 21:33:29 -08:00
Dane Everitt
ef1989f38b
Merge branch 'develop' into ts3-query-fix 2021-01-20 20:12:53 -08:00
Dane Everitt
aab353d91e
Merge pull request #3011 from AreYouRlyScared/addcronmonth
Adds months for schedules
2021-01-20 20:10:26 -08:00
Dane Everitt
914ee65ded
Don't use a persisted setting when switching users; ref #3021 2021-01-20 20:07:52 -08:00
Dane Everitt
3053a896f4
Update CHANGELOG.md 2021-01-19 21:45:32 -08:00
Dane Everitt
63f945bc3a
Add test coverage to cehck the authorization state of client resources 2021-01-19 21:20:55 -08:00
Dane Everitt
e8dcd30e0c
[security] fix resources not properly returning an error when they don't match the server in the URL
Prior to this fix certain resources were accessible even when their assigned server was not the same as the server in the URL. This causes the resource server relationship to not match the server variable present on the request.

Due to this failed logic it was possible for users to access resources they should not have been able to access otherwise for some areas of the panel.
2021-01-19 21:19:17 -08:00
Dane Everitt
eecd550c48
Make debugging test failures easier 2021-01-19 20:11:00 -08:00
Dane Everitt
f24193801a
Add endpoint for triggering restoration completion 2021-01-18 21:14:49 -08:00
Dane Everitt
e700b4da78
Whoops, don't store the model until we've successfully completed the transaction internals 2021-01-18 20:14:38 -08:00
Dane Everitt
8d69a60e28
Only allow restoring valid backups, set the server correctly on the repository 2021-01-18 20:11:49 -08:00
Dane Everitt
575eab9072
Less obtuse error messaging, include the request ID in the output 2021-01-17 20:51:41 -08:00
Charles Morgan
f5a97d4399 Edit UI
Moves cron time display under title bar.
2021-01-17 23:18:00 -05:00
Dane Everitt
187df97590
Add UI for restoring backup checkpoint text 2021-01-17 18:25:13 -08:00
Dane Everitt
ddc4c8e54b
Fix route def 2021-01-17 17:57:34 -08:00
Dane Everitt
87371901c0
Add base logic to support sending a request to restore a backup for a server 2021-01-17 17:51:09 -08:00
Dane Everitt
805952ac38
Update typescript bindings with new status field 2021-01-17 16:13:49 -08:00
Dane Everitt
8db3a05498
;-; 2021-01-17 16:08:41 -08:00
Dane Everitt
b38b8f6465
Mark some fields as deprecated in the API 2021-01-17 16:02:11 -08:00
Dane Everitt
cb40b280a4
Fix single failing test 2021-01-17 15:55:46 -08:00
Dane Everitt
a75a347d65
Remove suspended & installing fields, replace with single status field 2021-01-17 15:51:56 -08:00
Dane Everitt
4c29be2e54
Adjust some naming real quick 2021-01-17 15:25:49 -08:00
Dane Everitt
bfc6f34c50
Audit when a backup is successful or fails 2021-01-17 15:22:02 -08:00
Dane Everitt
291c65275a
Update audit design 2021-01-17 11:52:44 -08:00
Dane Everitt
ccecaa6694
Add basic auditing for filesystem actions
Specifically skipping read actions since there isn't much to say there, and it generally wouldn't be very helpful (plus, likely to generate lots of logs).
2021-01-17 11:46:08 -08:00
Dane Everitt
b15679d3bb
Add base logic for audit logging 2021-01-17 10:49:36 -08:00
Charles Morgan
ffeedf17e4 Adds months for schedules
Adds month variable for schedules
2021-01-16 22:07:39 -05:00
Torsten Widmann
34f5625450 added queryport and use default 2021-01-12 15:45:49 +01:00
Dane Everitt
9684456480
Add a todo for later 2021-01-10 17:05:41 -08:00
Dane Everitt
239984f92c
Add internal support for file denylist on eggs; closes #569 2021-01-10 17:02:14 -08:00
Dane Everitt
ff21d83e2d
Add endpoint to get all nodes meeting memory & disk requirements for a server; closes #1012 2021-01-10 13:08:43 -08:00
Matthew Penner
d964e1dce1 Fix formatting of docker workflow 2021-01-07 17:03:29 -07:00
Matthew Penner
8f183e6101 Properly add the version to Docker builds 2021-01-07 16:51:37 -07:00
Dane Everitt
ef3f8586c5
Update CHANGELOG.md 2021-01-06 21:45:06 -08:00
Dane Everitt
77082fdd26
Merge pull request #2979 from zKoz210/patch-5
Remove aria-description
2021-01-06 19:41:45 -08:00
Oreo Oreoniv
4125248b1b
Remove aria-description 2021-01-05 13:54:41 +03:00
Dane Everitt
7666aee1c7
Merge pull request #2956 from pterodactyl/fix/files-urlencoding
fix urlencoding in the file manager
2021-01-03 17:19:42 -08:00
Dane Everitt
b352c04685
Merge pull request #2957 from pterodactyl/fix/password-reset-mail
URL encode mail address in password reset link
2021-01-03 17:15:50 -08:00
Dane Everitt
53d1b307b6
Merge pull request #2955 from TekExplorer/update/eggs/image-selection
Add image selection for minecraft java eggs for java 8 & 11
2021-01-03 17:12:53 -08:00
Omar Kamel
61a04df469
prioritize java 11 for paper egg 2021-01-03 19:30:25 -05:00
Omar Kamel
c72ae436a9
missed an array 2021-01-03 19:28:29 -05:00
Dane Everitt
7813f17046
Merge pull request #2964 from AreYouRlyScared/Fixes
Update browsers list, linting & Changed page title
2021-01-03 16:23:12 -08:00
Dane Everitt
e8c2b2b464
Merge pull request #2954 from pterodactyl/fix/file-manager-transitions
use children in routes instead of component prop
2021-01-03 16:09:26 -08:00
Charles Morgan
3d627a70ce Lint + lock update
Updates the browsers list
Remove unused import
Changed the title of the users page from `Subusers` to just `Users`
2021-01-02 21:32:03 -05:00
Jakob Schrettenbrunner
44c668e208 url encode email in password reset link 2021-01-02 03:30:27 +01:00
Jakob Schrettenbrunner
4fd2af028d fix urlencoding in the filemanager 2021-01-02 02:15:32 +01:00
TekExplorer
77ca03a2b0 oversight 2021-01-01 23:54:14 +00:00
TekExplorer
2af6dca75e add image selection for minecraft java eggs for java 8 and 11 2021-01-01 23:52:31 +00:00
Jakob Schrettenbrunner
8fb28fdf22 remove unused import 2021-01-01 23:14:29 +01:00
Jakob Schrettenbrunner
0f9b3a5722 use children in routes instead of component prop 2021-01-01 23:14:11 +01:00
Dane Everitt
5f284dad1d
Update CHANGELOG.md 2020-12-30 18:13:28 -08:00
Dane Everitt
32d99c98ec
Merge pull request #2934 from zKoz210/patch-3
Fix retry after header
2020-12-29 15:46:24 -08:00
Oreo Oreoniv
421d838e35
Fix retry after header 2020-12-29 19:11:47 +03:00
Dane Everitt
9f0708f86b
Merge pull request #2925 from pterodactyl/fix/router-hot-reload
Fix hot-reloading breaking react-router-dom
2020-12-28 11:02:45 -08:00
Matthew Penner
b19406bf22 Fix hot-reloading breaking react-router-dom 2020-12-28 11:10:01 -07:00
Dane Everitt
dbb6f69e00
Use proper newline, not literal \n 2020-12-27 16:47:51 -08:00
Dane Everitt
794cf9d9dd
Make backup throttling configurable 2020-12-27 16:41:53 -08:00
Dane Everitt
a7fef8b736
Correctly handle backups that fail without an upload_id attached to them 2020-12-27 11:56:28 -08:00
Dane Everitt
952715facc
Fix handling of upload IDs on backups 2020-12-27 11:34:55 -08:00
Dane Everitt
8e06628409
Update package.json 2020-12-27 11:20:00 -08:00
Dane Everitt
2463c3f492
Cleanup and update some dependencies 2020-12-27 11:18:33 -08:00
Dane Everitt
7f8ae7a8f9
Make this an actual circle 2020-12-27 10:56:07 -08:00
Dane Everitt
621d652854
Fix focusring on disabled inputs 2020-12-27 10:52:40 -08:00
Dane Everitt
d54a8713d1
Fix width of dropdown menus 2020-12-27 10:49:33 -08:00
Dane Everitt
b2328b50c6
Fix checkbox design in file manager 2020-12-27 10:44:56 -08:00
Dane Everitt
4719124fd7
Merge branch 'dane/tailwind-2' into develop 2020-12-26 12:10:33 -08:00
Dane Everitt
bb2d3e4120
Slight UI tweaking to make life easier on people 2020-12-26 11:53:36 -08:00
Dane Everitt
1ba0f4fb16
Merge pull request #2914 from pterodactyl/fix/s3-backups
Store S3 upload_id in the database for backups
2020-12-26 11:34:31 -08:00
Matthew Penner
951d92b143 Store S3 upload_id in the database for backups 2020-12-26 11:59:21 -07:00
Dane Everitt
22687bd078
Stop caching stupid things and causing builds to die 2020-12-26 10:41:25 -08:00
Dane Everitt
c75f89889a
Update to Tailwind V2 2020-12-26 09:50:09 -08:00
Dane Everitt
9b01734752
Require meta key to trigger search; change from "k" to "/"; closes #2785 2020-12-25 15:55:31 -08:00
Dane Everitt
0477e66bab
Add server ID and node name to debug block; closes #2852 2020-12-25 15:52:15 -08:00
Dane Everitt
9193db9d46
Reset docker images correctly when changing egg; closes #2895 2020-12-25 15:43:44 -08:00
Dane Everitt
87e9d5e82a
Throttle pulls 2020-12-25 15:09:02 -08:00
Dane Everitt
70afc51c9e
Merge pull request #2883 from pterodactyl/matthewpi/transfer-improvements
Add Transfer Logs
2020-12-24 10:37:30 -08:00
Dane Everitt
2d081e5170
Merge branch 'develop' into matthewpi/transfer-improvements 2020-12-24 10:27:44 -08:00
Dane Everitt
4f23d1ab4c
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-12-24 10:23:09 -08:00
Dane Everitt
45a3533f1e
Update WebsocketControllerTest.php 2020-12-24 10:23:04 -08:00
Dane Everitt
44575439d6
💣 2020-12-24 10:22:32 -08:00
Dane Everitt
d214b0b3a9
Merge pull request #2795 from parkervcp/update/paper
update paper egg
2020-12-24 10:20:35 -08:00
Dane Everitt
19c6d82e23
Updates for PR 2020-12-24 10:20:17 -08:00
Dane Everitt
158823603a
Merge branch 'develop' into update/paper 2020-12-24 10:19:19 -08:00
Dane Everitt
6c39288def
Clarify error messaging for transfers 2020-12-24 10:14:10 -08:00
Dane Everitt
a2548c14ac
Fix logic since this accepts arrays now 2020-12-24 10:12:01 -08:00
Dane Everitt
25e53d9f22
Merge branch 'matthewpi/transfer-improvements' of https://github.com/Pterodactyl/Panel into matthewpi/transfer-improvements 2020-12-24 10:10:41 -08:00
Dane Everitt
2ee08a1a3d
Update logic for server transfer controller 2020-12-24 10:10:40 -08:00
Dane Everitt
6c61577699
Simplify logic in websocket control 2020-12-24 09:20:23 -08:00
Dane Everitt
6fa24d4979
Merge branch 'develop' into matthewpi/transfer-improvements 2020-12-24 09:17:21 -08:00
Dane Everitt
f300577963
Nuke useless tests 2020-12-24 09:16:30 -08:00
Dane Everitt
9a57011071
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-12-24 09:15:05 -08:00
Dane Everitt
087c41d5ac
Add endpoint to pull a remote file down 2020-12-24 09:15:03 -08:00
Dane Everitt
9c4c080a41
Merge pull request #2885 from pterodactyl/schrej-patch-1
remove mailtrap.io from example env config
2020-12-24 09:13:39 -08:00
Dane Everitt
2f17e75395
Merge pull request #2879 from pterodactyl/fix/backups-failing-early
Allow changing the prune age for backups
2020-12-24 09:12:59 -08:00
Dane Everitt
e678537cd5
Merge pull request #2838 from AreYouRlyScared/fix2807
Properly copy database-password
2020-12-24 09:11:51 -08:00
Dane Everitt
1f0883e746
Merge pull request #2904 from pterodactyl/matthewpi/archiver-tweaks
Archiver tweaks
2020-12-24 08:59:54 -08:00
Dane Everitt
dc4ead766c
Merge pull request #2901 from vilhelmprytz/vilhelmprytz-update-sponge-egg
eggs: SpongeVanilla: update default version
2020-12-24 08:56:39 -08:00
Matthew Penner
4b9eab8950 Send ignored_files as a string to wings 2020-12-22 19:31:52 -07:00
Vilhelm Prytz
2e6bb4e7ba
eggs: SpongeVanilla: update default version
* replaced 1.11.2-6.1.0-BETA-21 with 1.12.2-7.3.0 since it is the stable and recommended build
2020-12-22 17:48:28 +01:00
Matthew Penner
bb559422dc Make ESLint happy, fix minor issue with file manager breadcrumb 2020-12-19 11:51:26 -07:00
Matthew Penner
17ca3659c5 Change 'backups.prune_age' default to 6 hours 2020-12-19 11:50:35 -07:00
Jakob
fd93a4cda1
remove mailtrap.io from example env config 2020-12-18 00:08:01 +01:00
Matthew Penner
d8f75fa0b7 Fix failed transfers locking a server into a unaccessible state 2020-12-17 11:14:58 -07:00
Matthew Penner
37cfa151b6 Use ServerTransferringException 2020-12-17 10:37:14 -07:00
Matthew Penner
e69d9b2c26 Update comment in AuthenticateServerAccess.php 2020-12-17 10:35:54 -07:00
Matthew Penner
fd848985ee Add ServerTransferringException, use is_null 2020-12-17 10:35:54 -07:00
Matthew Penner
5668a780e2 Hopefully the last small tweaks and fixes to transfer logs 2020-12-17 10:35:54 -07:00
Matthew Penner
8d297a0918 Release reserved allocations upon archive failure 2020-12-17 10:35:54 -07:00
Matthew Penner
01926e2896 Improve logic for logging into the websocket of the target node 2020-12-17 10:35:54 -07:00
Matthew Penner
5c5e2e24f1 📯 tRaNsFeR lOgS 📯 2020-12-17 10:35:54 -07:00
Matthew Penner
e6c4a68e4a Update logic for tracking a server's transfer state 2020-12-17 10:35:54 -07:00
Dane Everitt
5d03c0d2e5
Properly handle loading files with special characters 2020-12-16 21:38:46 -08:00
Dane Everitt
0084b48d86
quick migration changes for refresh(ish) support; ref #2875
This still fails in a 2017 migration, but I don't care.
2020-12-16 20:38:21 -08:00
Matthew Penner
e34d31a58c Allow changing the prune age for backups 2020-12-16 14:15:07 -07:00
Dane Everitt
5bbb36b3cf
Support updating docker image for a server from the frontend 2020-12-13 11:07:29 -08:00
Dane Everitt
1dacd703df
Fix egg importing from seeder 2020-12-13 10:34:51 -08:00
Dane Everitt
638ea2e815
Support creating/updating docker images on eggs 2020-12-13 10:13:32 -08:00
Dane Everitt
78c4ac80bc
Basic implemention of multiple selectable images for an egg
The admin side of this is quite ugly when creating/editing a server, but I'm not putting effort into that right now with React Admin soon™
2020-12-13 09:53:17 -08:00
Charles Morgan
9d6f4e00d7 Properly copy database-password 2020-12-09 00:42:56 -05:00
Dane Everitt
3e65a2d055
Pass one at unfucking the stupid file encoding issues 2020-12-08 21:24:17 -08:00
Dane Everitt
24417ac516
Slightly less obtuse way of handling this little checkbox 2020-12-08 20:34:31 -08:00
Dane Everitt
60f170e919
Merge pull request #2796 from acl1704/update/forge
Update Forge egg
2020-12-08 19:57:33 -08:00
Dane Everitt
24fcaba817
Merge pull request #2811 from TekExplorer/patch-2
Correct Typo in Bug Report template
2020-12-08 19:56:18 -08:00
Dane Everitt
a66ee9673b
Merge pull request #2797 from pterodactyl/matthewpi/breadcrumb-patch-1
Add mb-4 to File Manager Breadcrumb when editing a file
2020-12-08 19:56:05 -08:00
Dane Everitt
f31a1288af
Don't show file mode in the manager 2020-12-08 19:54:32 -08:00
Omar Kamel
6e7dd36a89
Correct Typo in Bug Report template
installating > installing
smh lol. I find the typo funny but also let's just fix that real quick.
fixes #2808
2020-12-08 22:25:07 -05:00
Dane Everitt
76b9fae4e9
Merge pull request #2801 from pterodactyl/issue/2800
Delete the oldest backup, not the newest backup
2020-12-08 14:57:04 -08:00
Matthew Penner
911d85c230 Delete the oldest backup, not the newest backup, closes #2800 2020-12-07 09:31:44 -07:00
Matthew Penner
2fafd4fbbf Add mb-4 to File Manager Breadcrumb when editing a file 2020-12-06 20:42:05 -07:00
Alex
854270e4e8 fix required version variable
fixes required FORGE_VERSION and renames minecraft version variable to avoid confusion
2020-12-06 17:55:41 -08:00
Michael Parker
159b977b35
update paper egg
Updates the paper egg for 1.17 support with java 11 by default
2020-12-06 20:53:00 -05:00
Dane Everitt
63eefaa695
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-12-06 15:44:31 -08:00
Dane Everitt
1fcffc7eb9
Update CHANGELOG.md 2020-12-06 15:44:26 -08:00
Dane Everitt
fcff9085b8
Merge pull request #2781 from pterodactyl/matthewpi/server-details-patch-1
Show installing status instead of offline when a server is installing
2020-12-06 15:27:03 -08:00
Dane Everitt
4a3c9040a7
Merge pull request #2792 from pterodactyl/matthewpi/backups-patch-1
Handle CompleteMultipartUpload and AbortMultipartUpload on the Panel
2020-12-06 15:26:44 -08:00
Dane Everitt
ef787bbd78
Update DeleteSubuserTest.php 2020-12-06 15:26:20 -08:00
Dane Everitt
3ad1e90bad
Merge branch 'develop' into matthewpi/backups-patch-1 2020-12-06 15:17:12 -08:00
Matthew Penner
00429c3911 Cleanup remote backup controllers 2020-12-06 15:19:54 -07:00
Dane Everitt
f9ea96f45d
Less strict type; closes #2681 2020-12-06 14:17:54 -08:00
Dane Everitt
d22456d9ca
Block API access when 2FA is required on account; closes #2791 2020-12-06 13:56:14 -08:00
Matthew Penner
1ce6d3bbba Maybe we should keep that backup rate-limit 2020-12-06 13:55:45 -07:00
Matthew Penner
a5cebd6bcf s3 backups: handle CompleteMultipartUpload and AbortMultipartUpload on the panel instead of in wings, add BACKUP_PRESIGNED_URL_LIFESPAN environment variable 2020-12-06 13:53:55 -07:00
Matthew Penner
ac8b7fec28
Merge branch 'develop' into matthewpi/server-details-patch-1 2020-12-06 13:30:56 -07:00
Dane Everitt
5d23d894ae
Update NodeUpdateServiceTest.php 2020-12-06 12:25:36 -08:00
Dane Everitt
79673ca440
Don't ever block storing node updates if wings returns an error; closes #2712 2020-12-06 12:23:58 -08:00
Dane Everitt
11054de5b3
Attempt revocation of JWT access when changing a server's owner
closes #2771
2020-12-06 12:16:12 -08:00
Dane Everitt
af360d49dd
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-12-06 12:01:43 -08:00
Dane Everitt
a8d9eccf9c
Support pagination of server backups, closes #2787 2020-12-06 12:01:42 -08:00
Dane Everitt
a06f8e0d21
Merge pull request #2763 from AreYouRlyScared/hidedelifown
Hide delete button on own subuser if for the subuser looking at the page
2020-12-06 11:30:40 -08:00
Dane Everitt
7b9a8c8441
Merge pull request #2768 from pterodactyl/feature/chmod-files
Chmod Files from the File Manager
2020-12-06 11:30:33 -08:00
Dane Everitt
360d93bf2a
Merge pull request #2777 from pterodactyl/matthewpi/file-manager-patch-1
Move file manager buttons beside the breadcrumb
2020-12-06 11:30:27 -08:00
Dane Everitt
21d8dd455e
Merge pull request #2782 from TrixterTheTux/develop
Fix not being able to retrieve server's variables
2020-12-06 11:30:14 -08:00
Dane Everitt
0ca13fc9d0
Merge branch 'develop' into hidedelifown 2020-12-06 11:27:00 -08:00
Dane Everitt
e2be4e5ebf
Merge branch 'develop' into feature/chmod-files 2020-12-06 11:26:58 -08:00
Dane Everitt
616a6b8ea3
Merge branch 'develop' into matthewpi/file-manager-patch-1 2020-12-06 11:26:56 -08:00
Dane Everitt
8241ea5f98
Merge branch 'develop' into matthewpi/server-details-patch-1 2020-12-06 11:26:54 -08:00
Dane Everitt
ef49d21b54
Merge branch 'develop' into develop 2020-12-06 11:26:45 -08:00
Dane Everitt
8a97b73a6c
Fix failing tests 2020-12-06 11:25:26 -08:00
Dane Everitt
ec7bb22866
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-12-06 10:53:38 -08:00
Dane Everitt
7657d01c5c
Update README.md 2020-12-06 10:53:36 -08:00
Dane Everitt
86c97433ca
Merge pull request #2789 from TekExplorer/patch-1
Correct JDBC typo
2020-12-06 10:46:20 -08:00
Omar Kamel
ce0e9b7ded
Correct JDBC typo
from `JBDC CONNECTION STRING` > `JDBC CONNECTION STRING`
2020-12-06 13:17:47 -05:00
Stepan Fedotov
e32c4d4f05
Documentate fix 2020-12-04 19:58:09 +02:00
Stepan Fedotov
7c2888641f
Fix application API's ServerVariableTransformer 2020-12-04 19:56:44 +02:00
Matthew Penner
f9a1bc6c9b Show installing status instead of offline when a server is installing 2020-12-04 09:48:47 -07:00
Matthew Penner
3e1dbbaedd Fix validation rules for ChmodFilesRequest.php, again.. 2020-12-04 09:24:06 -07:00
Matthew Penner
bd0b7127d2 Fix validation rules for ChmodFilesRequest.php 2020-12-04 09:24:06 -07:00
Matthew Penner
ed5613e207 Show file mode on file listing, add ability to change file mode 2020-12-04 09:24:06 -07:00
Matthew Penner
8611ebb2d6 Add /api/client/servers/{server}/files/chmod endpoint 2020-12-04 09:24:06 -07:00
Matthew Penner
de1f7ea906 Move file manager buttons beside the breadcrumb, other tweaks 2020-12-04 09:23:17 -07:00
Dane Everitt
77abfd01ec
Merge pull request #2780 from danny6167/patch-1
Allow 0 in first octet of database client IP address Fixes #2779
2020-12-04 08:20:06 -08:00
danny6167
b97ebcbe39
Allow 0 in first octet of database client IP address Fixes #2779
Allow user to enter database connection IP address that contains a a 0 in the first octet. Fixes #2779
2020-12-04 19:18:08 +08:00
Charles Morgan
76d671aa8a Update UserRow.tsx 2020-11-29 19:35:16 -05:00
Charles Morgan
947fdf72ed Update UserRow.tsx 2020-11-29 18:13:20 -05:00
Dane Everitt
2b5d5c9e55
Merge pull request #2718 from j00005h/patch-1
Update index.blade.php
2020-11-29 13:43:14 -08:00
Dane Everitt
9a1c9f3e46
Merge pull request #2691 from GravityCube/develop
Backup rotation for schedules.
2020-11-29 13:42:48 -08:00
Dane Everitt
7ebe04fb91
Don't allow blank passwords on the password change endpoint; closes #2750 2020-11-29 13:28:46 -08:00
Dane Everitt
16f49f8dc1
Close cleanup; only try to run power actions against non-suspended & installed servers; closes #2760 2020-11-29 12:50:22 -08:00
Dane Everitt
26d409c29c
Don't try to flip null values; closes #2753 2020-11-29 11:50:20 -08:00
Dane Everitt
e54612d533
Merge pull request #2731 from AreYouRlyScared/fix2710
Rename duplicated input id
2020-11-29 11:07:23 -08:00
Dane Everitt
d68d5982b1
Merge pull request #2737 from zKoz210/patch-1
Fixed an error when trying to install dependencies without a .env file
2020-11-29 11:03:36 -08:00
Dane Everitt
b9e72c0034
Merge pull request #2739 from m0uka/develop
Add clickable URLs in console
2020-11-29 11:01:01 -08:00
Dane Everitt
8283de253f
Merge pull request #2747 from booky10/develop
Changed "Mojang" to "Minecraft" in EulaModalFeature.tsx
2020-11-29 10:58:48 -08:00
Charles Morgan
ec99859590 Don't show delete button if its own user
Don't show the delete button if a sub-user is looking at sub-users, as they cannot delete themselves.
2020-11-28 14:48:35 -05:00
booky10
76958cc6e7
Changed "Mojang" to "Minecraft" in EulaModalFeature.tsx 2020-11-26 17:59:29 +01:00
m0uka
2a54ac4f52 Add clickable URLs in console 2020-11-24 22:04:44 +01:00
Oreo Oreoniv
99c14ca422
Fixed an error when trying to install dependencies without a .env file 2020-11-24 22:48:27 +03:00
Charles Morgan
bdad2621b2 Rename duplicated input id
Renames the field id so its unique and chrome dosen't complain <3

Closes https://github.com/pterodactyl/panel/issues/2710
2020-11-22 03:06:18 -05:00
GravityCube
8fbcbcec45
Merge branch 'develop' into develop 2020-11-20 21:26:49 -03:00
Josh Miles
4b1f320004
Update index.blade.php 2020-11-16 13:51:02 +00:00
Dane Everitt
1473bf9b8c
Merge pull request #2714 from TekExplorer/patch-1
entrypoint.sh; docker/ directory change.
2020-11-15 14:43:17 -08:00
Omar Kamel
d030fcce34
entrypoint.sh; docker directory change.
update entrypoint script to mirror the directory change for the docker folder
2020-11-15 14:22:25 -05:00
Dane Everitt
d79b3a9cd0
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-11-14 20:46:49 -08:00
Dane Everitt
aaaa05be93
Fix docker build 2020-11-14 20:46:37 -08:00
Dane Everitt
280bbce69f
Update docker.yml 2020-11-14 20:45:42 -08:00
Dane Everitt
043dc20427
Update docker.yml 2020-11-14 20:27:11 -08:00
Dane Everitt
509c4e577b
Update docker.yml 2020-11-14 20:15:46 -08:00
Dane Everitt
89e10fd7f2
Update CHANGELOG.md [docker skip] 2020-11-14 20:14:16 -08:00
Dane Everitt
d18b7abf6c
fixes [docker skip] 2020-11-14 20:06:58 -08:00
Dane Everitt
d31a228220
properly skip action [docker skip] 2020-11-14 20:04:55 -08:00
Dane Everitt
8065b7d9f5
use GitHub container registry [skip docker] 2020-11-14 20:03:32 -08:00
Dane Everitt
181e4fa282
Update docker.yml 2020-11-14 20:02:07 -08:00
Dane Everitt
e84008d19b
Merge branch 'dane/docker' into develop 2020-11-14 20:01:25 -08:00
Dane Everitt
4ef04aa604
Update actions 2020-11-14 20:01:02 -08:00
Dane Everitt
9ffb5d2995
Add support for automated docker builds 2020-11-14 19:56:43 -08:00
Dane Everitt
7df3c1d013
Tweaks 2020-11-14 13:58:51 -08:00
Dane Everitt
83707079e8
Fixes for docker compose formatting and missing storage dir 2020-11-14 13:26:43 -08:00
Dane Everitt
fe725397eb
Code cleanup and improvement 2020-11-14 13:10:11 -08:00
GravityCube
5eebc7221d
Merge branch 'develop' into develop 2020-11-13 01:11:18 -03:00
Gonzalo Chavez
ebc8d40db8 Backup Rotation - Variable name changed 2020-11-11 16:03:57 -03:00
Gonzalo Chavez
e6a4a17922 Backup Rotation - Comment change 2020-11-11 16:02:39 -03:00
Gonzalo Chavez
7b8322e9c9 Backup Rotation - Minor changes 2020-11-11 10:52:28 -03:00
Dane Everitt
3b4a096ddb
Merge pull request #2684 from mattmalec/develop
Fix API 500 error
2020-11-10 20:16:32 -08:00
Dane Everitt
0c8b7101c3
Merge pull request #2682 from AreYouRlyScared/minorfixes
Update database page layout to be more consistent with other pages, fixes text visibility issues
2020-11-10 20:15:26 -08:00
Dane Everitt
2f2d105a4f
Fix test cases 2020-11-10 20:13:55 -08:00
Dane Everitt
a07e6bd36f
Merge pull request #2687 from occanowey/fix/file_manager_404
Dont add trailing slash to file manager rows
2020-11-10 10:46:20 -08:00
Dane Everitt
9707da86e3
Merge pull request #2686 from occanowey/feature/command_history
Keep cursor at the end of the line when going through command history
2020-11-10 10:46:05 -08:00
Gonzalo Chavez
1eaf486eaa Backup Rotation - Minor Changes 2020-11-09 21:14:47 -03:00
Gonzalo Chavez
1f01c653f1 Backup rotation for schedules. 2020-11-09 20:35:57 -03:00
Griffin T
f65cdd2dfb Dont add trailing slash to file manager row NavLink 2020-11-09 16:22:52 +08:00
Griffin T
76e3bcaa42 Keep cursor at the end of line when going through history 2020-11-09 15:34:56 +08:00
Matt Malec
df64026449
Update AuthenticateIPAccess.php
Fix a 500 error when processing a request with an IP filter
2020-11-08 21:57:22 -05:00
Charles Morgan
4a234af7a3
Minor changes
Changes CopyOnClick to allow any.
Allows database information to be copied on click.
Changes layouts on database/backups to match the network tab.
Changes text to lighten it one level from 400 to 300 for easier visibility.
Moves database api endpoints to their own folder for some organization.
2020-11-08 21:09:22 -05:00
Dane Everitt
085fa8dcb5
Update CopyOnClick.tsx 2020-11-08 17:13:55 -08:00
Dane Everitt
842652a6b8
Update CopyOnClick.tsx 2020-11-08 17:13:33 -08:00
Dane Everitt
6795bae335
Fix server state not being updated correctly when adding/removing allocation; closes #2680 2020-11-08 17:12:07 -08:00
Dane Everitt
74e90e087f
Fix allocation permission 2020-11-08 17:07:26 -08:00
Dane Everitt
2d19c12a5a
Update CHANGELOG.md 2020-11-08 15:29:23 -08:00
Dane Everitt
e0a087f077
Attempt to save a transaction a few times when creating a server; closes #2674 2020-11-08 13:19:52 -08:00
Dane Everitt
7cf6b4bcfe
Only load GA when valid key is provided; closes #2678 2020-11-08 13:18:15 -08:00
Dane Everitt
de943eac4a
Merge pull request #2636 from AreYouRlyScared/copynetwork
Network info added to details + ClickToCopy
2020-11-08 11:48:45 -08:00
Dane Everitt
74b1776c00
Merge pull request #2646 from AreYouRlyScared/#2608
Add admin area link to view config
2020-11-08 11:48:22 -08:00
Dane Everitt
b602473436
Merge pull request #2657 from AreYouRlyScared/permissions
Add missing descriptions for permissions
2020-11-08 11:47:54 -08:00
Dane Everitt
802f88fc78
Merge branch 'develop' into permissions 2020-11-08 11:47:45 -08:00
Dane Everitt
ce425435d4
Merge pull request #2666 from Yomanz/patch-1
Use app key from environment
2020-11-08 11:47:26 -08:00
Charles Morgan
e340cf16bf
remove permission based view
recent changes that were made always show the primary allocation to the end users even if they don't have the read permission.
2020-11-07 17:25:05 -05: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
f99ac0ecde
Fix some failing test cases 2020-11-06 22:33:39 -08:00
Dane Everitt
625fd92130
Fix URKL encoding hellscape; closes #2664 closes #2663 2020-11-06 20:47:03 -08:00
Daave
80574e991b
Remove quotes and fix indentation 2020-11-06 13:23:05 +00:00
Daave
9c33288902
Change entrypoint so it doesn't overwrite app key.
APP_KEY is overwritten by a generated one even if it's in the environment.
2020-11-06 13:21:09 +00:00
Dane Everitt
009f9c297d
Revoke JWT JTIs when modifying a subuser's permissions 2020-11-03 21:01:15 -08:00
Dane Everitt
c4df534722
Handle reconnect events for websocket errors 2020-11-03 20:33:05 -08:00
Dane Everitt
910a2d7a23
Back to checks all around 2020-11-03 19:07:52 -08:00
Charles Morgan
b2d2a931a9
Add missing descriptions for permissions 2020-11-03 16:11:59 -05:00
Dane Everitt
fb03c411ad
Get EULA hook modal into working order and start server when accepted 2020-11-02 21:06:47 -08:00
Dane Everitt
aba7df3afa
Basic concept for the EULA feature to demo how this will all work 2020-11-02 20:52:41 -08:00
Dane Everitt
505a9a6cbd
Update MC eggs to enable EULA feature flag 2020-11-02 20:24:24 -08:00
Dane Everitt
95d605c1e3
Fix validation schema 2020-11-02 20:24:11 -08:00
Dane Everitt
7618f306bd
Support functionality for per-egg features 2020-11-02 20:20:36 -08:00
Dane Everitt
7ec614ed2c
Reset modal spinner state when dismissed; closes #2647 2020-11-02 20:03:28 -08:00
Dane Everitt
027c705733
Correctly overlay spinner over all modal elements 2020-11-02 20:03:02 -08:00
Dane Everitt
b482632af4
Remove unnecessary calls to Wings to add/remove mounts 2020-11-02 19:58:14 -08:00
Dane Everitt
ebd81e9d1d
Properly pass along build information to Wings; closes #2552 2020-11-02 19:58:03 -08:00
Charles Morgan
274ed6c232
Update ServerDetailsBlock.tsx 2020-11-02 02:32:38 -05:00
Charles Morgan
40eee1220c
Update ServerDetailsBlock.tsx 2020-11-02 02:31:57 -05:00
Charles Morgan
c75a621c52
Only show allocation if user has permission
prevents just a blank scetion in the details box if a sub user dosn't have the permission of `allocation.read`

Also fixes the server router where it was set to `allocations` and not `allocation` making it not showup period even if the sub user had the correct permissions.
2020-11-02 00:49:07 -05:00
Charles Morgan
6d909a4a97
Add admin area link to view config 2020-11-02 00:14:02 -05:00
Dane Everitt
964a1436ce
Code cleanup for signed URL generation endpoint 2020-11-01 14:46:01 -08:00
Dane Everitt
6eff9d6211
Merge pull request #2634 from pterodactyl/issue/2599
Switch to s3 multipart uploads for backups
2020-11-01 14:34:03 -08:00
Matthew Penner
6af848ccea Tweaks to BackupRemoteUploadController.php 2020-11-01 15:27:43 -07:00
Matthew Penner
63ac81586d Tweaks to BackupRemoteUploadController.php 2020-11-01 15:27:43 -07:00
Matthew Penner
85af073438 Switch to s3 multipart uploads for backups 2020-11-01 15:27:43 -07:00
Dane Everitt
23d2352a9b
Don't ever return per_page as a string here... 2020-11-01 14:27:14 -08:00
Dane Everitt
4082503190
Show next schedule run time 2020-11-01 14:07:31 -08:00
Dane Everitt
b946b20193
Avoid pass-by-reference issues in config parsing leading to duplicated responses; ref #2511 2020-11-01 13:07:00 -08:00
Dane Everitt
63f8f53367
Fix server pagination when using search queries; closes #2593 2020-11-01 12:28:14 -08:00
Dane Everitt
48cde2e007
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-11-01 12:25:04 -08:00
Dane Everitt
61f501abc9
Fix file parser failing if multiple configuration values are present on same line; closes #2604 2020-11-01 12:25:02 -08:00
Dane Everitt
0132b51642
Merge pull request #2637 from AreYouRlyScared/fix2434
Fixes for PR#2434
2020-11-01 11:45:31 -08:00
Dane Everitt
8c8feffcb7
Encode all parts of the URI individually, closes #2620 2020-11-01 11:44:47 -08:00
Charles Morgan
6ac5741d8a
Update app.php 2020-11-01 03:19:28 -05:00
Charles Morgan
f029b7239e
re-remove console limiting options 2020-11-01 03:16:30 -05:00
Charles Morgan
fc0f8ee48e
Update ServerDetailsBlock.tsx 2020-11-01 02:55:29 -05:00
Charles Morgan
e80b125543
Add network info
Adds network info to the server details section, Also copied to clipboard when clicked.

Closes https://github.com/pterodactyl/panel/issues/2585
2020-11-01 02:50:35 -05:00
Dane Everitt
9ff691bfde
Merge pull request #2554 from AreYouRlyScared/subusers
Duplicate save/invite button at top
2020-10-31 22:30:52 -07:00
Dane Everitt
fda50bb6e1
Merge pull request #2434 from pressstartearly/develop
Added Autoallocation Button
2020-10-31 22:30:16 -07:00
Dane Everitt
49c29aae47
Logic fixes 2020-10-31 22:30:03 -07:00
Dane Everitt
6cb21fb920
Add test coverage for allocation auto-assignment service 2020-10-31 22:17:32 -07:00
Dane Everitt
d493685518
Add test coverage for allocation assignment endpoint 2020-10-31 21:57:27 -07:00
Dane Everitt
b2be067f38
Support deleting an allocation for a server 2020-10-31 21:22:44 -07:00
Dane Everitt
365f5e0806
server_id is irrelevant at this stage 2020-10-31 14:59:06 -07:00
Dane Everitt
c6bd7ff661
Improve logic handle auto-allocation of ports for a server 2020-10-31 14:58:15 -07:00
Charles Morgan
aad3019747
Merge branch 'develop' into subusers 2020-10-31 17:32:10 -04:00
Charles Morgan
0f09dfed92
Update EditSubuserModal.tsx 2020-10-31 17:29:41 -04:00
Dane Everitt
7638ffccde
Merge branch 'develop' into pr/2434 2020-10-31 14:12:13 -07:00
Dane Everitt
31ad238e8b
Thanks for that highlight phpstorm... 2020-10-31 14:11:53 -07:00
Dane Everitt
db7e4e749f
UI cleanup for add allocation button 2020-10-31 14:10:53 -07:00
Dane Everitt
abb043c1cc
Merge branch 'develop' into pr/2434 2020-10-31 13:55:56 -07:00
Dane Everitt
283cb08e33
Remove unused 2020-10-31 13:55:45 -07:00
Dane Everitt
665a4dd8a4
Merge branch 'develop' into develop 2020-10-31 13:47:12 -07:00
Dane Everitt
7fd49dd823
Merge pull request #2610 from occanowey/feature/command_history
Add console command history.
2020-10-31 13:46:24 -07:00
Dane Everitt
8aeab889f4
Merge pull request #2624 from pterodactyl/matthewpi/configs-patch-1
Add more environment variables for S3 filesystem options
2020-10-31 13:45:48 -07:00
Dane Everitt
e157b8baf2
Merge pull request #2627 from pterodactyl/matthewpi/admin-patch-1
Tweaks to admin area
2020-10-31 13:45:26 -07:00
Dane Everitt
c757abfdc2
Merge pull request #2633 from AreYouRlyScared/changes
Network view changes
2020-10-31 13:45:09 -07:00
Charles Morgan
394cd815d2
Network tab changes
Allows address feild to be copied to the clipboard when clicked
If alias is used changes it to hostname instead of ip address ( might just make it say address as that would cover both? )
Fixed overflow for allocations with a long alias
2020-10-31 16:16:41 -04:00
Dane Everitt
c948a217a4
Update tests.yml 2020-10-31 13:10:52 -07:00
Dane Everitt
84ed2f8668
Update tests.yml 2020-10-31 12:34:54 -07:00
Dane Everitt
992f98b6c1
Add notification for discord hook 2020-10-31 12:27:18 -07:00
Dane Everitt
8eaa44411f
Update ServerRow.tsx 2020-10-31 12:09:59 -07:00
Dane Everitt
87a8238c56
Correctly render suspended server in dashboard listing; closes #2613 2020-10-31 12:07:20 -07:00
Dane Everitt
ff64220741
Avoid N+1 location query for servers 2020-10-31 11:28:31 -07:00
Dane Everitt
c00e5b36a5
Return all servers for a node as a paginated response
Avoids crashing the PHP process and avoids a bad runaway N+1 query issue that previously existed.
2020-10-31 11:14:28 -07:00
Matthew Penner
d9ad4af6a7 admin: update description on Mounts index view 2020-10-30 11:02:55 -06:00
Matthew Penner
48013eddcc admin: update transfer server box on manage tab 2020-10-30 11:02:29 -06:00
Matthew Penner
fcdf154a12 Add more environment variables for S3 filesystem options 2020-10-29 19:39:55 -06:00
Griffin T
6e4261b3a7 Limit per server command history to 32. 2020-10-27 18:19:33 +08:00
Dane Everitt
73b795faba
Correctly reset a schedule if there is an exception during the run stage; closes #2550 2020-10-26 20:54:15 -07:00
Dane Everitt
bffec5b3dc
Don't abort the entire schedule running process if one schedule encounters an exception; closes #2609 2020-10-26 20:16:39 -07:00
Dane Everitt
200a78d77b
Don't allow null schedule names anymore; ref #2609 2020-10-26 19:57:08 -07:00
Griffin T
a4d3e7db1b Add console command history. 2020-10-26 20:30:30 +08:00
Michael (Parker) Parker
e8e2206a40
Fix install scripts (#2600) 2020-10-25 18:17:12 -07:00
Dane Everitt
ad4df56f7c
Update CHANGELOG.md 2020-10-25 18:12:22 -07:00
Dane Everitt
2bd2cdcd1c
Update README.md 2020-10-25 18:06:07 -07:00
Dane Everitt
0a6cf5ba25
lint; skip ci 2020-10-25 17:31:24 -07:00
Dane Everitt
092c942764
Fix server owner filtering; improve searching for servers; closes #2581 2020-10-25 17:29:57 -07:00
Dane Everitt
39dddba1d6
Refactor subuser modal and fix to be less of a code monstrosity; closes #2583 2020-10-25 15:47:50 -07:00
Dane Everitt
21d4402a55
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-10-25 15:07:13 -07:00
Dane Everitt
996fb5b46f
Set the DB timezone on each connection to match the APP_TIMEZONE value 2020-10-25 15:07:11 -07:00
Dane Everitt
8c6327fd32
Let MySQL do the time logic when looking for tasks 2020-10-25 15:06:54 -07:00
Michael (Parker) Parker
3ecf14d419
fix install scripts (#2587) 2020-10-25 13:16:18 -07:00
Anders G. Jørgensen
a271b59092
Change SameSite attribute on session cookies to "lax" (#2592) 2020-10-25 13:15:49 -07:00
Dane Everitt
cfaf41ce24
Merge pull request #2576 from AreYouRlyScared/patch-1
find != fund
2020-10-23 08:07:48 -07:00
Charles Morgan
404ad68e0d
find != fund 2020-10-23 03:37:35 -04:00
Dane Everitt
23872b844a
Fix unnecessary object structuring 2020-10-22 21:33:06 -07:00
Dane Everitt
7ed3c25d61
Merge pull request #2545 from wardpieters/develop
fix: duplicate 2FA error messages
2020-10-22 21:31:37 -07:00
Dane Everitt
fd3b11e9cc
Update CHANGELOG.md 2020-10-22 21:27:15 -07:00
Dane Everitt
903b5795db
Avoid breaking the entire UI when naughty characters are present in the file name or directory; closes #2575 2020-10-22 21:18:46 -07:00
Dane Everitt
65d04d0c05
Correctly handle schedule task deletion and avoid errors; closes #2534 2020-10-22 20:54:58 -07:00
Dane Everitt
e1fa6d4e55
Merge pull request #2573 from parkervcp/update_eggs
Update eggs
2020-10-21 16:49:12 -07:00
parkervcp
d522bc9150
update install scripts
change all install scripts to use debian:buster-slim

update mc install scripts
update steamcmd install scripts
update voice install scripts.
2020-10-21 19:33:45 -04:00
parkervcp
16422ebf7b
remove unused eggs 2020-10-21 19:33:45 -04:00
Dane Everitt
26de4493dd
Set notes to null when assigning allocation; ref #2553 2020-10-19 21:08:40 -07:00
Dane Everitt
1f5e0c0334
Update build modification service and cover logic with test cases
closes #2553
2020-10-19 21:07:07 -07:00
Dane Everitt
b3598b3b98
Update README.md 2020-10-19 15:27:06 -07:00
Charles Morgan
e0bc9ac50f
Duplicate save/invite button at top
Adds the Save / Invite User button at the top also
2020-10-18 04:31:54 -04:00
Ward Pieters
1c4ee31491
fix: duplicate enable 2FA error messages 2020-10-18 00:46:46 +02:00
Ward Pieters
f5dfe86eff
fix: duplicate disable 2FA error messages 2020-10-18 00:42:52 +02:00
Ward Pieters
f859d37b25
fix: duplicate 2FA error messages (https://github.com/pterodactyl/panel/issues/2455) 2020-10-18 00:02:46 +02:00
Dane Everitt
c370e08f65
[security] add login throttling to the 2FA verification endpoint 2020-10-17 14:46:10 -07:00
Dane Everitt
cbbe5b6fa9
Reset error messages between login screens; ref #2455 2020-10-17 14:45:33 -07:00
Dane Everitt
527ba1adc4
Fix recaptcha not resetting on login fail; closes #2397 2020-10-17 14:30:54 -07:00
Dane Everitt
9621f923f5
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-10-17 14:23:06 -07:00
Dane Everitt
5763493c6c
Allow setting the backup limit via the API; closes #2535 2020-10-17 14:23:00 -07:00
Dane Everitt
d7262664fd
Merge pull request #2544 from pterodactyl/matthewpi/mounts-patch-1
Deny certain paths when using server mounts
2020-10-17 13:56:19 -07:00
Dane Everitt
545d53e93d
Merge branch 'develop' into matthewpi/mounts-patch-1 2020-10-17 13:56:08 -07:00
Dane Everitt
35f24e7f22
Fix theme stuff 2020-10-17 13:54:34 -07:00
Dane Everitt
0260efc966
Fix some PHPstorm nightmare 2020-10-17 13:47:21 -07:00
Dane Everitt
b95e40f298
Merge pull request #2543 from pterodactyl/issue/2541
Fix white highlight hiding console text
2020-10-17 13:43:37 -07:00
Dane Everitt
820d8f7560
Better logic for using theme values 2020-10-17 13:43:22 -07:00
Matthew Penner
8ba291afb2 Fix Mount.php validation rules 2020-10-17 14:43:07 -06:00
Matthew Penner
66b9169458 Cleanup code in MountController.php, again. 2020-10-17 14:42:08 -06:00
Matthew Penner
050075b835 Cleanup code in MountController.php 2020-10-17 14:37:35 -06:00
Matthew Penner
f7520b721b Deny /etc/pterodactyl as a source path for mounts 2020-10-17 14:29:29 -06:00
Matthew Penner
c52c5d6736 Deny certain paths for mounts 2020-10-17 14:28:02 -06:00
Matthew Penner
ebe3375897 Fix white highlight hiding console text (fixes #2541) 2020-10-17 14:25:44 -06:00
Dane Everitt
b02a49f42e
Get everything on the same version 2020-10-17 12:23:25 -07:00
Dane Everitt
b8377b840f
Update README.md 2020-10-17 12:11:14 -07:00
Dane Everitt
839e277763
Fix exception when passing location IDs to creation service; closes #2529 2020-10-17 11:52:21 -07:00
Dane Everitt
f54151e0f6
Merge pull request #2525 from Spirit55555/patch-2
Remove target="blank" from /admin link
2020-10-17 10:38:14 -07:00
Dane Everitt
6aeb467155
Merge pull request #2540 from HavilaQQ/user-delete-fix
Fix artisan p:user:delete not working
2020-10-17 10:35:48 -07:00
Nobody
10548c9d8f Update message and update query 2020-10-17 18:26:34 +01:00
Dane Everitt
e3fe46882f
Merge pull request #2539 from pterodactyl/schrej-patch-1
use emoji directly instead of :names:
2020-10-17 10:26:08 -07:00
Jakob
652e93871d
use emoji directly instead of :names: 2020-10-17 19:25:09 +02:00
Dane Everitt
aa879d0f62
Merge pull request #2538 from pterodactyl/schrej-patch-1
replace installation help issue template with link to discord
2020-10-17 10:20:18 -07:00
Jakob
18911d8fe4
remove installation help issue template 2020-10-17 19:19:42 +02:00
Jakob
eabc17eab3
add conact links to discord to issue creation page 2020-10-17 19:19:03 +02:00
Anders G. Jørgensen
7ad26fc456
Remove target="blank" from /admin link
This should be changed to make it consistent with the admin panel, where the link back to the user panel does not open in a new tab.
2020-10-16 15:49:35 +02: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
a4abb2543b
lint 2020-10-15 21:28:43 -07:00
Dane Everitt
f52f13600f
Fix text wrap on long server names in search bar 2020-10-15 21:23:31 -07:00
Dane Everitt
f30dab053b
Support much better server querying from frontend
Search all servers if making a query as an admin, allow searching by a more complex set of data, fix unfocus on search field when loading indicator was rendered
2020-10-15 21:21:38 -07:00
Dane Everitt
9726a0de46
Autofocus search when opening; closes #2522 2020-10-15 20:09:13 -07:00
Dane Everitt
5eda27933f
Merge pull request #2512 from AreYouRlyScared/xtermstuff
Upgrade Xterm to v4.9, Add Search
2020-10-15 19:56:29 -07:00
Dane Everitt
2685295110
Merge branch 'develop' into xtermstuff 2020-10-15 19:56:09 -07:00
Charles Morgan
8f2e90d1e8
Update Console.tsx 2020-10-15 16:41:11 -04:00
Dane Everitt
14099c164b
Add test coverage for schedule service 2020-10-14 21:17:57 -07:00
Dane Everitt
e7c64bc60e
Add test coverage for schedule execution 2020-10-14 21:06:27 -07:00
Dane Everitt
c1ee0ac4f8
Add support for executing a scheduled task right now 2020-10-14 20:38:59 -07:00
Dane Everitt
f33d0b1d72
Update schedule view UI 2020-10-14 20:13:36 -07:00
Charles Morgan
28844bf62c
Merge branch 'develop' into xtermstuff 2020-10-14 11:42:01 -04:00
Charles Morgan
807707c07e
Update Console.tsx 2020-10-14 11:38:59 -04:00
Dane Everitt
33a43de723
Merge pull request #2515 from AreYouRlyScared/subuserfix
Update UsersContainer.tsx
2020-10-14 08:22:08 -07:00
Charles Morgan
cdb881efaf
Fix naming 2020-10-14 09:54:06 -04:00
Charles Morgan
c53b14acef
Close search bar on esacpe
Allows the searchbar to be closed when a user clicks escape, just like in the browser.
2020-10-14 07:23:02 -04:00
Charles Morgan
471cadda77
Update UsersContainer.tsx
Closes #2514
2020-10-14 04:54:17 -04:00
Charles Morgan
9dc0c3e2c3
Upgrade Xterm to v4.9, Add Search
Changes:
Added ` xterm-addon-search ` v0.7.0
Added ` xterm-addon-search-bar ` v0.2.0
Updated ` webpack ` v4.43.0 -> v4.44.2
Updated ` xterm `  v3.14.4 -> v4.9.0
Updated ` xterm-addon-fit `  v0.1.0 -> v0.7.0
Updated ` xterm-addon-attach ` v0.1.0 -> v0.4.0

With the added packages above, when a user does Ctrl + F a search box will apear within the console for them to search whats in the console.

This was requested in discord to allow the lines in the console to be searchable.
2020-10-14 02:34:53 -04:00
Caleb
ea778e9345
Merge branch 'develop' into develop 2020-10-13 15:35:38 -04:00
Caleb
b725e45ed1
Merge pull request #4 from pterodactyl/release/v1.0.1
Release/v1.0.1
2020-10-13 15:28:25 -04:00
Dane Everitt
110b2568d5
Update changelog 2020-10-12 21:12:31 -07:00
Pterodactyl CI
59305f14dd bump version for release 2020-10-13 04:04:58 +00:00
Dane Everitt
6274c451af
COrrectly set the breadcrumbs when using browser back; closes #2485 2020-10-12 21:02:51 -07:00
Dane Everitt
7a0ac1d5c2
Revert "Merge pull request #2482 from AreYouRlyScared/fix-2386"
This reverts commit a967dbc6fc, reversing
changes made to 289de72aca.
2020-10-12 20:59:11 -07:00
Dane Everitt
49ddd63dbd
Do not allow running the up or seed commands if migrations have not been run 2020-10-12 20:51:35 -07:00
Dane Everitt
d5f2242c89
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-10-12 20:15:22 -07:00
Dane Everitt
ef586bf752
Up the default API throttle for the client API to avoid issues with large numbers of servers 2020-10-12 20:15:12 -07:00
Dane Everitt
a967dbc6fc
Merge pull request #2482 from AreYouRlyScared/fix-2386
Remove trailing slash if one is present
2020-10-12 20:14:05 -07:00
Dane Everitt
289de72aca
Merge pull request #2497 from pterodactyl/fix/server-mounts
Fix server mounts
2020-10-12 20:13:35 -07:00
Dane Everitt
1ad8b3f37d
Do not mark a server as "not installed" when updating it's startup arguments 2020-10-12 20:12:34 -07:00
Dane Everitt
2eccfcc1e3
Nuke existing server_transfers tables; done trying to be nice to plugin devs 2020-10-12 18:42:03 -07:00
Matthew Penner
3ef3c2a461 Remove commented code 2020-10-12 11:12:23 -06:00
Matthew Penner
abd60ee6f8 Fix 500 error when mounting a mount and fix the actual mount being deleted instead of the relation 2020-10-12 11:11:40 -06:00
Dane Everitt
d795668fc2
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-10-11 16:19:58 -07:00
Dane Everitt
d4db80b5c9
Update CHANGELOG.md 2020-10-11 16:19:56 -07:00
Charles Morgan
f7fd63dff9
Remove trailing slash if one is present
Closes https://github.com/pterodactyl/panel/issues/2386
2020-10-11 18:38:09 -04:00
Dane Everitt
9112de4bfb
Merge pull request #2481 from AreYouRlyScared/fix-2435
Yeh Yeh.... Remove validation rules
2020-10-11 15:36:18 -07:00
Charles Morgan
4b8a275a78
Update AdvancedSettingsFormRequest.php 2020-10-11 18:33:25 -04:00
Dane Everitt
08dcb85e5d
Merge pull request #2480 from AreYouRlyScared/fix-2435
Remove unused settings from admin side
2020-10-11 15:24:31 -07:00
Charles Morgan
5c105822b6
Remove unused settings
Closes https://github.com/pterodactyl/panel/issues/2435
2020-10-11 18:21:01 -04:00
Dane Everitt
18fce37565
Fix subuser permissions not migrating correctly from 0.7; closes #2309 2020-10-11 15:13:17 -07:00
Dane Everitt
1e08f7d2d2
Merge pull request #2454 from zKoz210/patch-1
Fixed phantom shadow when opening modal window
2020-10-11 12:36:49 -07:00
Dane Everitt
2041bc078a
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop 2020-10-11 12:36:02 -07:00
Dane Everitt
ebe3f6a32a
Fix unit tests 2020-10-11 12:35:54 -07:00
Dane Everitt
2f5e080074
Remove unnecessary break-all 2020-10-11 12:34:48 -07:00
Dane Everitt
c6d6221711
Correctly fix the UI for API keys 2020-10-11 12:29:00 -07:00
Dane Everitt
d8e3e0a5f7
Merge branch 'develop' into pr/2454 2020-10-11 12:15:53 -07:00
Dane Everitt
78a3f933d1
Merge pull request #2476 from AreYouRlyScared/fix
Fix missing semi, Fixed task row overflow
2020-10-11 12:07:06 -07:00
Dane Everitt
bb9c0c968a
Merge pull request #2466 from LeJeanbono/rename_cpu_thread
Rename CPU Threads for CPU Pinning
2020-10-11 12:06:54 -07:00
Dane Everitt
8697185900
Fix up database creation and handling code for servers; ref #2447 2020-10-11 11:59:46 -07:00
Charles Morgan
c8b00f0ccf
Fix missing semi, Fixed task tow overflow
Was suppsoe to be correct in https://github.com/pterodactyl/panel/pull/2352 but seems to be picky. Should now correctly show a multiline text box and not a long skinny text box when the text overflows.

Also, fixed a missing semicolon. 👍
2020-10-11 04:35:26 -04:00
Dane Everitt
a4d7170fac
Don't allow creation of a database with an identical name for the same server; closes #2447 2020-10-10 18:17:04 -07:00
Dane Everitt
7b0f998f0b
Return the correct server & subuser counts for user listing; closes #2469 2020-10-10 18:06:42 -07:00
Dane Everitt
1f7fe093ae
Correctly validate description for API keys to match model expectations; closes #2457 2020-10-10 17:15:30 -07:00
Dane Everitt
1f28fb94e2
Ensure the UUID is set correctly; closes #2450 2020-10-10 17:11:27 -07:00
Dane Everitt
a9e4587125
Ensure debug is false in tests to avoid accidentally masking exception responses wrongly 2020-10-10 16:51:44 -07:00
Dane Everitt
69f27ed807
Update and test variable validator logic 2020-10-10 16:46:56 -07:00
Dane Everitt
d8228f2da8
Allow passing empty values through for variables, covers with test, closes #2433 2020-10-10 16:45:24 -07:00
Dane Everitt
bf6e1ce966
Document what is being tested a little better so it isn't just a wall of code 2020-10-09 22:12:45 -07:00
Dane Everitt
c2db163731
Update node finding service logic to be single query; add test coverage 2020-10-09 22:01:25 -07:00
Dane Everitt
3decbd1f46
Temporarily disable flaky tests on Github 2020-10-09 21:14:06 -07:00
Dane Everitt
192a578a03
Add basic test coverage for server creation functionality 2020-10-09 21:08:27 -07:00
Dane Everitt
b2970e3117
Fastest way to passing tests is deleting the failing ones. 👍 2020-10-09 20:21:10 -07:00
Oreo Oreoniv
1e3f3fb053
Fixed incorrect button appearance 2020-10-09 12:15:23 +03:00
Dane Everitt
c59a2c436b
Don't waste time on a service better suited to an integration test 2020-10-08 22:34:52 -07:00
Dane Everitt
2560163655
Modify how deletion service works (actually fixes #2085); cover changes with test 2020-10-08 21:08:55 -07:00
Dane Everitt
7a643beee0
Add test coverage for startup modification 2020-10-08 20:38:21 -07:00
Dane Everitt
d087bebc93
Add some additional test coverage and clean up modification service and suspension service 2020-10-07 21:56:44 -07:00
LeJeanbono
0b559f8acb Rename CPU Threads for CPU Pinning 2020-10-06 23:09:16 +02:00
Dane Everitt
83efb2d7b6
More fixes for broken unit tests 2020-10-05 21:54:29 -07:00
Dane Everitt
b9eb87deaa
Fix node and schedule unit tests 2020-10-05 21:31:39 -07:00
Dane Everitt
0c2bd416ee
Fix unit tests for eggs 2020-10-05 21:29:35 -07:00
Dane Everitt
0f4f2235a3
More Laravel-esq job processing 2020-10-05 20:46:41 -07:00
Oreo Oreoniv
ec313a7362
Fixed description for API keys 2020-10-05 12:36:03 +03:00
Oreo Oreoniv
62e111657c
Fixed a bug with an incorrect size modal 2020-10-05 11:53:11 +03:00
Oreo Oreoniv
0fa503f923
Fixed phantom shadow when opening modal window 2020-10-05 11:36:47 +03:00
Dane Everitt
e1e079bc12
Update README.md 2020-10-03 21:49:26 -07:00
Dane Everitt
2d01c7b988
Reset is_processing state of a schedule when toggling active/inactive; closes #2425 2020-10-03 19:47:52 -07:00
Dane Everitt
57457f0e9c
Oops, also include the server status 2020-10-03 19:37:36 -07:00
Dane Everitt
6b52a36b31
Significantly reduce the number of re-renders on the console page when stats are flowing 2020-10-03 19:36:26 -07:00
Dane Everitt
5fc4444f5a
Refit terminal when screen is resized; closes #2365 2020-10-03 19:21:11 -07:00
Dane Everitt
2d56cacbab
Don't trigger a 500 error with bad data; closes #2442
This whole chunk of code needs some cleanup but I'll defer that for the new admin area in the future
2020-10-03 19:05:04 -07:00
Dane Everitt
d1c30607cf
UI updates for server rows to show current status 2020-10-03 16:36:31 -07:00
Dane Everitt
2a42ef5c62
Mobile responsiveness fixes 2020-10-03 16:25:39 -07:00
Dane Everitt
47d59ca20f
Fix mobile UI for allocation rows 2020-10-03 15:48:31 -07:00
Dane Everitt
4ff5de7e1b
decode before encoding URLs, closes #2440 2020-10-03 12:51:41 -07:00
Dane Everitt
99c9682f67
Fix errors with mounts; closes #2374 2020-10-03 12:42:27 -07:00
Dane Everitt
b4a9a7205d
speeling is hard 2020-10-03 12:14:39 -07:00
Dane Everitt
fb482abb9c
Also cache bust 2020-10-03 11:37:11 -07:00
Stepan Fedotov
62856556b9
Apply security fixes from #2441 to 1.0 2020-10-03 11:34:36 -07:00
Charles Morgan
3473e1dfbf
Remove console logging (#2415)
Remove console logging, as its not an error being logged i see no reason for this to be printed when the startup page is viewed.
2020-10-03 11:23:16 -07:00
Oreo Oreoniv
10eeae0927
Fix text overflows through out the front end (#2406) 2020-10-03 11:22:37 -07:00
Oreo Oreoniv
6893f9bfcd
Fixes for mobile responsiveness on the console page (#2411) 2020-10-03 11:21:09 -07:00
Dane Everitt
1616cf1318
Always show errors from HTTP exceptions correctly to the user; closes #2439 2020-10-03 11:18:14 -07:00
Caleb
4770af453b Removed loggin and reverted changes to webpack 2020-09-29 14:42:02 -04:00
Caleb
0017ab5397 Delete .env.bkup 2020-09-29 12:04:16 -04:00
Caleb
24cad5587b Update .gitignore 2020-09-29 12:03:14 -04:00
Caleb
fb33824e10 Added admin controls.
Removed the note in the server settings that stated that the allocations feature is currently not implemented.

Properly check to make sure that there are allocations available in range before trying to create it.
2020-09-29 12:00:59 -04:00
Caleb
d80660f047 Added admin configuration
This is not working just yet but the fields have been added to the admin control area.
2020-09-28 16:14:14 -04:00
Caleb
da30977364 Merge branch 'develop' of https://github.com/pressstartearly/panel into develop 2020-09-28 11:51:09 -04:00
Caleb
8f8bd0be83 Added Automatic Allocations
Known issues:
- Port range to auto create is hard coded
- React interface is still a WIP.
2020-09-28 11:50:34 -04:00
Dane Everitt
f31a6d3967
Fix parameter bindings for client API routes; closes pterodactyl/panel#2359 2020-09-27 10:39:18 -07:00
Dane Everitt
1db7e4db66
Request stats from wings when loading the console; closes pterodactyl/panel#2414 2020-09-27 09:45:37 -07:00
Dane Everitt
ff50940fa6
Fix keyboard save shortcut when saving a new file; closes #2427 2020-09-27 09:30:24 -07:00
Dane Everitt
da0b527715
Do not re-render rows excessively 2020-09-27 09:30:05 -07:00
Dane Everitt
3e899ffc51
Handle JWT expirations a little better 2020-09-27 09:22:09 -07:00
Dane Everitt
47697e07cf
Add test coverage for creating a subuser 2020-09-26 17:25:14 -07:00
Dane Everitt
cc6f98c0fd
Replace all instances of 255 as a max length with 191; ref #2421 2020-09-26 16:29:26 -07:00
Dane Everitt
4f21fa85f8
finish fixing folder names when lots of slashes exist; closes #2377 2020-09-25 20:44:40 -07:00
Dane Everitt
fe849789a2
Dont display server usage as red if unlimited; closes #2417 2020-09-25 20:32:10 -07:00
Dane Everitt
bcbd2c4996
Add new sponsor 2020-09-24 21:24:01 -07:00
Dane Everitt
3340ee7fd8
Fix bad encoding when handling files; closes #2399 2020-09-24 20:27:02 -07:00
Dane Everitt
711efe34bb
Truncate auto-generated usernames to 64 characters 2020-09-24 19:37:39 -07:00
Dane Everitt
c0fc9125ed
Fix database naming conventions; closes #2404 2020-09-24 19:31:42 -07:00
Dane Everitt
6a4914df3b
Properly validate schedule names; closes #2405 2020-09-24 19:25:34 -07:00
Dane Everitt
48a104667f
Fix re-rendering mess on allocation page 2020-09-24 19:20:19 -07:00
Caleb
e1a01fd595 changed package.json to be ignored 2020-09-24 14:43:22 -04:00
Dane Everitt
cbedd4539c
Performance cleanup; check main box when all children are checked; closes #2379 2020-09-22 21:41:35 -07:00
Dane Everitt
2182a15494
Don't return variables to users that they should not be able to see; closes #2388 2020-09-22 21:12:00 -07:00
Dane Everitt
7968258004
appease TS 2020-09-22 20:52:37 -07:00
Dane Everitt
4bfc91a30e
Fix mutation of directory name with slashes in it; closes #2377 2020-09-22 20:50:44 -07:00
Dane Everitt
36eb04893d
Not used, make things less confusing 2020-09-22 20:42:48 -07:00
Dane Everitt
7f9b21e486
Correctly show number of servers a user belongs to; closes #2375 2020-09-22 20:13:54 -07:00
Dane Everitt
1b0a6252f1
Fix undefined index error; closes #2378; closes #2391 2020-09-22 19:58:30 -07:00
Dane Everitt
d4363cb36f
Merge pull request #2362 from AreYouRlyScared/fixes
Remove unused imports
2020-09-22 19:46:25 -07:00
Charles Morgan
c928214a83
Fix overflows through out the front end (#2382)
* Fix overflows through out the front end

Fixed Server row overflow for servers name and description
Fixed Sub-user overflow for users with oddly long emails....
Fixed Server new overflow on console view.

See Attached images.

* Remove conflicting server name limits
2020-09-22 19:37:41 -07:00
Dane Everitt
c75ed20b26
Merge pull request #2396 from pterodactyl/fix-2361
Fix empty array in node config YAML
2020-09-22 19:36:41 -07:00
Anand Capur
dda13f80c7
Fix empty array in node config YAML 2020-09-22 16:09:28 -07:00
Charles Morgan
f6bec474f4
Remove unused imports 2020-09-18 03:43:33 -04:00
Caleb
edeaa69dff
Merge pull request #3 from pterodactyl/develop
Pull from upstream
2020-09-16 11:23:13 -04:00
Caleb
f54d4f965c
Merge pull request #2 from pterodactyl/develop
Update From Upstream
2020-08-29 08:57:06 -04:00
Caleb
d3a544ac5d
Merge pull request #1 from pterodactyl/develop
Upstream Update
2020-08-16 12:00:54 -04:00
909 changed files with 22230 additions and 22881 deletions

View File

@ -2,7 +2,6 @@ module.exports = {
twin: {
preset: 'styled-components',
autoCssProp: true,
config: './tailwind.config.js',
},
styledComponents: {
pure: true,

View File

@ -8,6 +8,7 @@ APP_DELETE_MINUTES=10
APP_ENVIRONMENT_ONLY=true
LOG_CHANNEL=daily
APP_LOCALE=en
APP_URL=http://panel.example.com
DB_HOST=127.0.0.1
DB_PORT=3306
@ -19,12 +20,18 @@ HASHIDS_SALT=
HASHIDS_LENGTH=8
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_HOST=smtp.example.com
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM=no-reply@example.com
MAILGUN_ENDPOINT=api.mailgun.net
# You should set this to your domain to prevent it defaulting to 'localhost', causing
# mail servers such as Gmail to reject your mail.
#
# @see: https://github.com/pterodactyl/panel/pull/3110
# SERVER_NAME=panel.example.com
QUEUE_HIGH=high
QUEUE_STANDARD=standard

4
.eslintignore Normal file
View File

@ -0,0 +1,4 @@
public
node_modules
resources/views
webpack.config.js

View File

@ -44,6 +44,8 @@ rules:
array-bracket-spacing:
- warn
- always
# Remove errors for not having newlines between operands of ternary expressions https://eslint.org/docs/rules/multiline-ternary
multiline-ternary: 0
"react-hooks/rules-of-hooks":
- error
"react-hooks/exhaustive-deps": 0
@ -76,6 +78,13 @@ rules:
- 1
- "line-aligned"
"react/jsx-closing-tag-location": 1
# This setup is required to avoid a spam of errors when running eslint about React being
# used before it is defined.
#
# see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
no-use-before-define: 0
"@typescript-eslint/no-use-before-define":
- warn
overrides:
- files:
- "**/*.tsx"

View File

@ -1,35 +0,0 @@
---
name: "\U0001F41B Bug Report"
about: For reporting code or design bugs with the software. DO NOT REPORT APACHE/NGINX/PHP CONFIGURATION ISSUES.
---
DO NOT REPORT ISSUES CONFIGURING: SSL, PHP, APACHE, NGINX, YOUR MACHINE, SSH, SFTP, ETC. ON THIS GITHUB TRACKER.
For assistance installating this software, as well as debugging issues with dependencies, please use our discord server: https://discord.gg/pterodactyl
You MUST complete all of the below information when reporting a bug, failure to do so will result in closure of your issue. PLEASE stop spamming our tracker with "bugs" that are not related to this project.
**STOP: READ FIRST, AND THEN DELETE THE ABOVE LINES**
**Background (please complete the following information):**
* Panel or Daemon:
* Version of Panel/Daemon:
* Server's OS:
* Your Computer's OS & Browser:
**Describe the bug**
A clear and concise description of what the bug is.
Please provide additional information too, depending on what you have issues with:
Panel: `php -v` (the php version in use).
Daemon: `uname -a` and `docker info` (your kernel version and information regarding docker)
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen. If applicable, add screenshots or a recording to help explain your problem.

View File

@ -1,17 +0,0 @@
---
name: "\U0001F680 Feature Request"
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -1,14 +0,0 @@
---
name: "⛔ Installation Help"
about: 'Visit our Discord for installation help: https://pterodactyl.io/discord'
---
We use GitHub issues only to discuss about Pterodactyl bugs and new features. For
this kind of questions about using Pterodactyl, please visit our Discord for assistance: https://pterodactyl.io/discord
DO NOT REPORT ISSUES CONFIGURING: SSL, PHP, APACHE, NGINX, YOUR MACHINE, SSH, SFTP, ETC. ON THIS GITHUB TRACKER.
For assistance installating this software, as well as debugging issues with dependencies, please use our discord server: https://discord.gg/pterodactyl
PLEASE stop spamming our tracker with "bugs" that are not related to this project.

69
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@ -0,0 +1,69 @@
name: Bug Report
description: Something isn't working quite right in the software.
labels: [not confirmed]
body:
- type: markdown
attributes:
value: |
Bug reports should only be used for reporting issues with how the software works. For assistance installing this software, as well as debugging issues with dependencies, please use our [Discord server](https://discord.gg/pterodactyl).
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please [search here](https://github.com/pterodactyl/panel/issues) to see if an issue already exists for your problem.
options:
- label: I have searched the existing issues before opening this issue.
required: true
- type: textarea
attributes:
label: Current Behavior
description: Please provide a clear & concise description of the issue.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: Please describe what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: Please be as detailed as possible when providing steps to reproduce, failure to provide steps will likely result in this issue being closed.
validations:
required: true
- type: input
id: panel-version
attributes:
label: Panel Version
description: Version number of your Panel (latest is not a version)
placeholder: 1.4.0
validations:
required: true
- type: input
id: wings-version
attributes:
label: Wings Version
description: Version number of your Wings (latest is not a version)
placeholder: 1.4.2
validations:
required: true
- type: textarea
id: panel-logs
attributes:
label: Error Logs
description: |
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"
render: bash
validations:
required: false

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Installation Help
url: https://discord.gg/pterodactyl
about: Please visit our Discord for help with your installation.
- name: General Question
url: https://discord.gg/pterodactyl
about: Please visit our Discord for general questions about Pterodactyl.

View File

@ -0,0 +1,32 @@
name: Feature Request
description: Suggest a new feature or improvement for the software.
labels: [feature request]
body:
- type: checkboxes
attributes:
label: Is there an existing feature request for this?
description: Please [search here](https://github.com/pterodactyl/panel/issues?q=is%3Aissue) to see if someone else has already suggested this.
options:
- label: I have searched the existing issues before opening this feature request.
required: true
- type: textarea
attributes:
label: Describe the feature you would like to see.
description: "A clear & concise description of the feature you'd like to have added, and what issues it would solve."
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: "You must explain how you'd like to see this feature implemented. Technical implementation details are not necessary, rather an idea of how you'd like to see this feature used."
validations:
required: true
- type: textarea
attributes:
label: Additional context to this request.
description: "Add any other context or screenshots about the feature request."
validations:
required: false

View File

@ -2,7 +2,7 @@
This is a ready to use docker image for the panel.
## Requirements
This docker image requires some additional software to function. The software can either be provided in other containers (see the [docker-compose.yml](docker-compose.yml) as an example) or as existing instances.
This docker image requires some additional software to function. The software can either be provided in other containers (see the [docker-compose.yml](https://github.com/pterodactyl/panel/blob/develop/docker-compose.example.yml) as an example) or as existing instances.
A mysql database is required. We recommend the stock [MariaDB Image](https://hub.docker.com/_/mariadb/) image if you prefer to run it in a docker container. As a non-containerized option we recommend mariadb.
@ -33,7 +33,7 @@ Note: If your `APP_URL` starts with `https://` you need to provide an `LETSENCRY
| ------------------- | ------------------------------------------------------------------------------ | -------- |
| `APP_URL` | The URL the panel will be reachable with (including protocol) | yes |
| `APP_TIMEZONE` | The timezone to use for the panel | yes |
| `LETSENCRYPT_EMAIL` | The email used for letsencrypt certificate generation | yes |
| `LE_EMAIL` | The email used for letsencrypt certificate generation | yes |
| `DB_HOST` | The host of the mysql instance | yes |
| `DB_PORT` | The port of the mysql instance | yes |
| `DB_DATABASE` | The name of the mysql database | yes |
@ -73,4 +73,4 @@ Every driver requires `MAIL_FROM` to be set.
| mandrill | [Mandrill](http://www.mandrill.com/) | `MAIL_USERNAME` |
| postmark | [Postmark](https://postmarkapp.com/) | `MAIL_USERNAME` |
| mailgun | [Mailgun](https://www.mailgun.com/) | `MAIL_USERNAME`, `MAIL_HOST` |
| smtp | Any SMTP server can be configured | `MAIL_USERNAME`, `MAIL_HOST`, `MAIL_PASSWORD`, `MAIL_PORT` |
| smtp | Any SMTP server can be configured | `MAIL_USERNAME`, `MAIL_HOST`, `MAIL_PASSWORD`, `MAIL_PORT` |

View File

@ -1,18 +1,14 @@
#!/bin/ash
## Ensure we are in /app
#!/bin/ash -e
cd /app
mkdir -p /var/log/panel/logs/ /var/log/supervisord/ /var/log/nginx/ /var/log/php7/ \
&& rm -rf /app/storage/logs/ \
&& chmod 777 /var/log/panel/logs/ \
&& ln -s /var/log/panel/logs/ /app/storage/
&& chmod 777 /var/log/panel/logs/ \
&& ln -s /var/log/panel/logs/ /app/storage/logs/
## check for .env file and generate app keys if missing
if [ -f /app/var/.env ]; then
echo "external vars exist."
rm -rf /app/.env
ln -s /app/var/.env /app/
else
echo "external vars don't exist."
@ -20,16 +16,21 @@ else
touch /app/var/.env
## manually generate a key because key generate --force fails
echo -e "Generating key."
APP_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
echo -e "Generated app key: $APP_KEY"
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
if [ -z $APP_KEY ]; then
echo -e "Generating key."
APP_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
echo -e "Generated app key: $APP_KEY"
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
else
echo -e "APP_KEY exists in environment, using that."
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
fi
ln -s /app/var/.env /app/
fi
echo "Checking if https is required."
if [ -f /etc/nginx/conf.d/default.conf ]; then
if [ -f /etc/nginx/http.d/panel.conf ]; then
echo "Using nginx config already in place."
if [ $LE_EMAIL ]; then
echo "Checking for cert update"
@ -41,40 +42,35 @@ else
echo "Checking if letsencrypt email is set."
if [ -z $LE_EMAIL ]; then
echo "No letsencrypt email is set using http config."
cp docker/default.conf /etc/nginx/conf.d/default.conf
cp .github/docker/default.conf /etc/nginx/http.d/panel.conf
else
echo "writing ssl config"
cp docker/default_ssl.conf /etc/nginx/conf.d/default.conf
cp .github/docker/default_ssl.conf /etc/nginx/http.d/panel.conf
echo "updating ssl config for domain"
sed -i "s|<domain>|$(echo $APP_URL | sed 's~http[s]*://~~g')|g" /etc/nginx/conf.d/default.conf
sed -i "s|<domain>|$(echo $APP_URL | sed 's~http[s]*://~~g')|g" /etc/nginx/http.d/panel.conf
echo "generating certs"
certbot certonly -d $(echo $APP_URL | sed 's~http[s]*://~~g') --standalone -m $LE_EMAIL --agree-tos -n
fi
echo "Removing the default nginx config"
rm -rf /etc/nginx/http.d/default.conf
fi
## check for DB up before starting the panel
echo "Checking database status."
until nc -z -v -w30 $DB_HOST 3306
until nc -z -v -w30 $DB_HOST $DB_PORT
do
echo "Waiting for database connection..."
# wait for 5 seconds before check again
sleep 5
# wait for 1 seconds before check again
sleep 1
done
## make sure the db is set up
echo -e "Migrating and Seeding D.B"
php artisan migrate --force
php artisan db:seed --force
php artisan migrate --seed --force
## start cronjobs for the queue
echo -e "Starting cron jobs."
crond -L /var/log/crond -l 5
## install yarn stuff
yarn install --production
yarn add cross-env
yarn run build:production
echo -e "Starting supervisord."
exec "$@"
exec "$@"

49
.github/workflows/docker.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: Publish Docker Image
on:
push:
branches:
- 'develop'
tags:
- 'v*'
jobs:
push_to_registry:
name: Push Image to GitHub Packages
runs-on: ubuntu-latest
# Always run against a tag, even if the commit into the tag has [docker skip]
# within the commit message.
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
steps:
- uses: actions/checkout@v2
- uses: crazy-max/ghaction-docker-meta@v1
id: docker_meta
with:
images: ghcr.io/pterodactyl/panel
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Bump Version
if: "!contains(github.ref, 'develop')"
env:
REF: ${{ github.ref }}
run: |
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
- name: Release Production Build
uses: docker/build-push-action@v2
if: "!contains(github.ref, 'develop')"
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
- name: Release Development Build
uses: docker/build-push-action@v2
if: "contains(github.ref, 'develop')"
with:
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

View File

@ -1,10 +1,8 @@
name: "Release"
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-20.04
@ -13,7 +11,7 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: '12'
- name: Create release branch and bump version
env:
REF: ${{ github.ref }}
@ -32,11 +30,11 @@ jobs:
run: |
yarn install
yarn run build:production
- name: Create release archive
run: |
rm -rf node_modules/ test/ codecov.yml CODE_OF_CONDUCT.md CONTRIBUTING.md phpunit.dusk.xml phpunit.xml Vagrantfile
tar -czf panel.tar.gz * .env.example
tar -czf panel.tar.gz * .env.example .babel-plugin-macrosrc.js
- name: Extract changelog
id: extract_changelog
@ -63,25 +61,25 @@ jobs:
body_path: ./RELEASE_CHANGELOG
draft: true
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
- name: Upload binary
id: upload-release-archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: panel.tar.gz
asset_name: panel.tar.gz
asset_content_type: application/gzip
- name: Upload checksum
id: upload-release-checksum
id: upload-release-checksum
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./checksum.txt
asset_name: checksum.txt
asset_content_type: text/plain

View File

@ -1,67 +1,59 @@
name: tests
name: Run Tests
on:
push:
branch-ignore:
- 'master'
- 'release/**'
branches:
- 'develop'
- 'v2'
pull_request:
jobs:
integration_tests:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
tests:
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: false
matrix:
php: [ 7.4, 8.0 ]
database: [ 'mariadb:10.2', 'mysql:8' ]
services:
mysql:
image: mysql:5.7
database:
image: ${{ matrix.database }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: panel_test
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: true
matrix:
php: [7.3, 7.4]
name: PHP ${{ matrix.php }}
name: "php-${{ matrix.php }} (${{ matrix.database }})"
steps:
- name: checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: get cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: cache dependencies
uses: actions/cache@v2
- uses: actions/cache@v2
with:
path: |
~/.php_cs.cache
${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }}
restore-keys: |
${{ runner.os }}-cache-${{ matrix.php }}-
- name: setup
uses: shivammathur/setup-php@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: cli, openssl, gd, mysql, pdo, mbstring, tokenizer, bcmath, xml, curl, zip
tools: composer:v1
extensions: bcmath, cli, curl, gd, mbstring, mysql, openssl, pdo, tokenizer, xml, zip
tools: composer:v2
coverage: none
- name: configure
run: cp .env.ci .env
- name: install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: run cs-fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff
- run: cp .env.ci .env
- run: composer install --prefer-dist --no-interaction --no-progress
- run: vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff --config .php-cs-fixer.dist.php
continue-on-error: true
- name: execute unit tests
run: vendor/bin/phpunit --bootstrap bootstrap/app.php tests/Unit
run: vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Unit
if: ${{ always() }}
env:
DB_CONNECTION: testing
TESTING_DB_HOST: UNIT_NO_DB
- name: execute integration tests
run: vendor/bin/phpunit tests/Integration
if: ${{ always() }}
env:
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
TESTING_DB_PORT: ${{ job.services.database.ports[3306] }}
TESTING_DB_USERNAME: root

7
.gitignore vendored
View File

@ -1,6 +1,9 @@
/vendor
*.DS_Store*
.env
!.env.ci
!.env.dusk
!.env.example
.env*
.vagrant/*
.vscode/*
storage/framework/*
@ -10,8 +13,10 @@ storage/framework/*
node_modules
*.log
_ide_helper.php
_ide_helper_models.php
.phpstorm.meta.php
.php_cs.cache
.yarn
public/assets/manifest.json
# For local development with docker

52
.php-cs-fixer.dist.php Normal file
View File

@ -0,0 +1,52 @@
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = (new Finder())
->in(__DIR__)
->exclude([
'vendor',
'node_modules',
'storage',
'bootstrap/cache',
])
->notName(['_ide_helper*']);
return (new Config())
->setRiskyAllowed(true)
->setFinder($finder)
->setRules([
'@Symfony' => true,
'@PSR1' => true,
'@PSR2' => true,
'@PSR12' => true,
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'heredoc_to_nowdoc' => true,
'no_alias_functions' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_return' => true,
'ordered_imports' => [
'sortAlgorithm' => 'length',
],
'phpdoc_align' => [
'align' => 'left',
'tags' => [
'param',
'property',
'return',
'throws',
'type',
'var',
],
],
'random_api_migration' => true,
'ternary_to_null_coalescing' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
]);

58
.php_cs
View File

@ -1,58 +0,0 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in([
'app',
'bootstrap',
'config',
'database',
'resources/lang',
'routes',
'tests',
]);
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@PSR1' => true,
'@PSR2' => true,
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_return' => true,
'blank_line_before_statement' => false,
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'single'],
'heredoc_to_nowdoc' => true,
'increment_style' => ['style' => 'post'],
'linebreak_after_opening_tag' => true,
'method_argument_space' => [
'ensure_fully_multiline' => false,
'keep_multiple_spaces_after_comma' => false,
],
'new_with_braces' => false,
'no_alias_functions' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_superfluous_phpdoc_tags' => false,
'no_unreachable_default_argument_value' => true,
'no_useless_return' => true,
'not_operator_with_successor_space' => true,
'ordered_imports' => [
'sortAlgorithm' => 'length',
],
'phpdoc_align' => false,
'phpdoc_separation' => false,
'protected_to_private' => false,
'psr0' => ['dir' => 'app'],
'psr4' => true,
'random_api_migration' => true,
'single_line_throw' => false,
'single_trait_insert_per_statement' => false,
'standardize_not_equals' => true,
'ternary_to_null_coalescing' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
])->setRiskyAllowed(true)->setFinder($finder);

View File

@ -1,16 +0,0 @@
<?php
use Sami\Sami;
use Symfony\Component\Finder\Finder;
$iterator = Finder::create()
->files()
->name('*.php')
->in($dir = __DIR__ . '/app');
return new Sami($iterator, array(
'title' => 'Pterodactyl',
'build_dir' => __DIR__ . '/.sami/build',
'cache_dir' => __DIR__ . '/.sami/cache',
'default_opened_level' => 2,
));

View File

@ -1,7 +0,0 @@
preset: laravel
risky: false
disabled:
- concat_without_spaces
enabled:
- concat_with_spaces
- no_unused_imports

View File

@ -1,36 +0,0 @@
language: php
dist: trusty
git:
depth: 3
quiet: true
matrix:
fast_finish: true
allow_failures:
- env: TEST_SUITE=Coverage
env:
matrix:
- TEST_SUITE=Unit
- TEST_SUITE=Coverage
- TEST_SUITE=Integration
php:
- 7.4
sudo: false
cache:
directories:
- $HOME/.composer/cache
services:
- mysql
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
before_script:
- echo 'opcache.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- cp .env.travis .env
- travis_retry composer install --no-interaction --prefer-dist --no-suggest
script:
- if [ "$TEST_SUITE" = "Unit" ]; then vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Unit; fi;
- if [ "$TEST_SUITE" = "Coverage" ]; then vendor/bin/phpunit --bootstrap vendor/autoload.php --coverage-clover coverage.xml tests/Unit; fi;
- if [ "$TEST_SUITE" = "Integration" ]; then vendor/bin/phpunit tests/Integration; fi;
notifications:
email: false
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -1,10 +1,13 @@
# Local Development
Pterodactyl is now powered by Vuejs and Tailwindcss and uses webpack at its core to generate compiled assets. Release
versions of Pterodactyl will include pre-compiled, minified, and hashed assets ready-to-go.
Pterodactyl is now powered by React, Typescript, and Tailwindcss using webpack at its core to generate compiled assets.
Release versions of Pterodactyl will include pre-compiled, minified, and hashed assets ready-to-go.
However, if you are interested in running custom themes or making modifications to the Vue files you'll need a build
system in place to generate these compiled assets. To get your environment setup, you'll first need to install at least Nodejs
`8`, and it is _highly_ recommended that you also install [Yarn](https://yarnpkg.com) to manage your `node_modules`.
However, if you are interested in running custom themes or making modifications to the React files you'll need a build
system in place to generate these compiled assets. To get your environment setup you'll need at minimum:
* Node.js 12
* [Yarn](https://classic.yarnpkg.com/lang/en/) v1
* [Go](https://golang.org/) 1.15.
### Install Dependencies
```bash
@ -12,17 +15,19 @@ yarn install
```
The command above will download all of the dependencies necessary to get Pterodactyl assets building. After that, its as
simple as running the command below to generate assets while you're developing.
simple as running the command below to generate assets while you're developing. Until you've run this command at least
once you'll likely see a 500 error on your Panel about a missing `manifest.json` file. This is generated by the commands
below.
```bash
# build the compiled assets for development
# Build the compiled set of assets for development.
yarn run build
# build the assets automatically when files are modified
# Build the assets automatically as they are changed. This allows you to refresh
# the page and see the changes immediately.
yarn run watch
```
### Hot Module Reloading
For more advanced users, we also support 'Hot Module Reloading', allowing you to quickly see changes you're making
to the Vue template files without having to reload the page you're on. To Get started with this, you just need
@ -37,21 +42,22 @@ is the `--host` flag, which is required and should point to the machine where th
The second is the `PUBLIC_PATH` environment variable which is the URL pointing to the HMR server and is appended to all of
the asset URLs used in Pterodactyl.
#### Vagrant
If you want to use HMR with our Vagrant image, you can use `yarn run v:serve` as a shortcut for the correct parameters.
In order to have proper file change detection you can use the [`vagrant-notify-forwarder`](https://github.com/mhallin/vagrant-notify-forwarder) to notify file events from the host to the VM.
```sh
vagrant plugin install vagrant-notify-forwarder
vagrant reload
```
#### Development Environment
If you're using the [`pterodactyl/development`](https://github.com/pterodactyl/development) environments, which are
highly recommended, you can just run `yarn run serve` to run the HMR server, no additional configuration is necessary.
### Building for Production
Once you have your files squared away and ready for the live server, you'll be needing to generate compiled, minified, and
hashed assets to push live. To do so, run the command below:
Once you have your files squared away and ready for the live server, you'll be needing to generate compiled, minified,
and hashed assets to push live. To do so, run the command below:
```bash
yarn run build:production
```
This will generate a production ready `bundle.js` and `bundle.css` as well as a `manifest.json` and store them in
the `/public/assets` directory where they can then be access by clients, and read by the Panel.
This will generate a production JS bundle and associated assets, all located in `public/assets/` which will need to
be uploaded to your server or CDN for clients to use.
### Running Wings
To run `wings` in development all you need to do is set up the configuration file as normal when adding a new node, and
then you can build and run a local version of Wings by executing `make debug` in the Wings code directory. This must
be run on a Linux VM of some sort, you cannot run this locally on macOS or Windows.

View File

@ -3,6 +3,374 @@ This file is a running track of new features and fixes to each version of the pa
This project follows [Semantic Versioning](http://semver.org) guidelines.
## v1.6.6
### Fixed
* **[security]** Fixes a CSRF vulnerability for both the administrative test email endpoint and node auto-deployment token generation endpoint. [GHSA-wwgq-9jhf-qgw6](https://github.com/pterodactyl/panel/security/advisories/GHSA-wwgq-9jhf-qgw6)
### Changed
* Updates Minecraft eggs to include latest Java 17 yolk by default.
## v1.6.5
### Fixed
* Fixes broken application API endpoints due to changes introduced with session management in 1.6.4.
## v1.6.4
_This release should not be used, please use `1.6.5`. It has been pulled from our releases._
### Fixed
* Fixes a session management bug that would cause a user who signs out of one browser to be unintentionally logged out of other browser sessions when using the client API.
## v1.6.3
### Fixed
* **[Security]** Changes logout endpoint to be a POST request with CSRF-token validation to prevent a malicious actor from triggering a user logout.
* Fixes Wings receiving the wrong server suspension state when syncing servers.
### Added
* Adds additional throttling to login and password reset endpoints.
* Adds server uptime display when viewing a server console.
## v1.6.2
### Fixed
* **[Security]** Fixes an authentication bypass vulerability that could allow a malicious actor to login as another user in the Panel without knowing that user's email or password.
## v1.6.1
### Fixed
* Fixes server build modifications not being properly persisted to the database when edited.
* Correctly exposes the `oom_disabled` field in the `build` limits block for a server build so that Wings can pick it up.
*
## v1.6.0
### Fixed
* Fixes array merging logic for server transfers that would cause a 500 error to occur in some scenarios.
* Fixes user password updates not correctly logging the user out and returning a failure message even upon successful update.
* Fixes the count of used backups when browsing a paginated backup list for a server.
* Fixes an error being triggered when API endpoints are called with no `User-Agent` header and an audit log is generated for the action.
* Fixes state management on the frontend not properly resetting the loading indicator when adding subusers to a server.
* Fixes extraneous API calls being made to Wings for the server file listing when not on a file manager screen.
### Added
* Adds foreign key relationship on the `mount_node`, `mount_server` and `egg_mount` tables.
* Adds environment variable `PER_SCHEDULE_TASK_LIMIT` to allow manual overrides for the number of tasks that can exist on a single schedule. This is currently defaulted to `10`.
* OOM killer can now be configured at the time of server creation.
### Changed
* Server updates are not dependent on a successful call to Wings occurring — if the API call fails internally the error will be logged but the server update will still be persisted.
### Removed
* Removed `WingsServerRepository::update()` function — if you were previously using this to modify server elements on Wings please replace calls to it with `::sync()` after updating Wings.
## v1.5.1
### Fixed
* Fixes Docker image 404ing instead of being able to access the Panel.
* Fixes Java version feature being only loaded when the `eula` feature is specified.
* Fixes `php artisan p:upgrade` not forcing and seeding while running migrations.
* Fixes spinner overlays overlapping on the server console page.
* Fixes Wings being unable to update backup statuses.
## v1.5.0
### Fixed
* Fixes deleting a locked backup that has also been marked as failed to allow deletion rather than returning an error about being locked.
* Fixes server creation process not correctly sending `start_on_completion` to Wings instance.
* Fixes `z-index` on file mass delete modal so it is displayed on top of all elements, rather than hidden under some.
* Supports re-sending requests to the Panel API for backups that are currently marked as failed, allowing a previously failed backup to be marked as successful.
* Minor updates to multiple default eggs for improved error handling and more accurate field-level validation.
### Updated
* Updates help text for CPU limiting when creating a new server to properly indicate virtual threads are included, rather than only physical threads.
* Updates all of the default eggs shipped with the Panel to reference new [`ghcr.io` yolks repository](https://github.com/pterodactyl/yolks).
* When adding 2FA to an account the key used to generate the token is now displayed to the user allowing them to manually input into their app if necessary.
### Added
* Adds SSL/TLS options for MySQL and Redis in line with most recent Laravel updates.
* New users created for server MySQL instances will now have the correct permissions for creating foreign keys on tables.
* Adds new automatic popup feature to allow users to quickly update their Minecraft servers to the latest Java® eggs as necessary if unsupported versions are detected.
### Removed
* Removes legacy `userInteraction` key from eggs which was unused.
## v1.4.2
### Fixed
* Fixes logic to disallow creating a backup schedule if the server's backup limit is set to 0.
* Fixes bug preventing a database host from being updated if the linked node is set to "none".
* Fixes files and menus under the "Mass Actions Bar" being unclickable when it is visible.
* Fixes issues with the Teamspeak and Mumble eggs causing installs to fail.
* Fixes automated query to avoid pruning backups that are still running unintentionally.
* Fixes "Delete Server" confirmation modal on the admin screen to actually show up when deleting rather than immediately deleting the server.
### Added
* Adds support for locking individual server backups to prevent deletion by users or automated backup processes.
* List of files to be deleted is now shown on the delete file confirmation modal.
* Adds support for using `IF` statements in database queries when a database user is created through the Panel.
* Adds support for using a custom mailgun API endpoint rather than only the US based endpoint.
* Adds CPU limit display next to the current CPU usage to match disk and memory usage reporting.
* Adds a "Scroll to Bottom" helper element to the server console when not scrolled to the bottom currently.
* Adds support for querying the API for servers by using the `uuidShort` field rather than only the `uuid` field.
### Changed
* Updates codebase to use TypeScript 4.
* **[security]**: removes the external dependency for loading QRCode images. They're now generated directly on the frontend using JavaScript.
## v1.4.1
### Added
* Adds support for only running a schedule if the server is currently in an online state.
* Adds support for ignoring errors during task execution and continuing on to the next item in the sequence. For example, continuing to a server restart even if sending a command beforehand failed.
* Adds the ability to specify the group to use for file permissions when using the `p:upgrade` command.
* Adds the ability to manually run a schedule even if it is currently disabled.
## v1.4.0
### Fixed
* Removes the use of tagging when storing server resource usage in the cache. This addresses errors encountered when using the `file` driver.
* Fixes Wings response handling if Wings returns an error response with a 200-level status code that would improperly be passed back to the client as a successful request.
* Fixes use of JSON specific functions in SQL queries to better support MariaDB users.
* Fixes a migration that could fail on some MySQL/MariaDB setups when trying to encrypt node token values.
### Changed
* Increases the maximum length allowed for a server name using the Rust egg.
* Updated server resource utilization API call to Wings to use new API response format used by `Wings@1.4.0`.
## v1.3.2
### Fixed
* Fixes self-upgrade incorrectly executing the command to un-tar downloaded archives.
* Fixes the checkbox to delete all files when restoring a backup not actually passing that along in the API call. Files will now properly be deleted when restoring if selected.
* Fixes some keybindings not working correctly in the server console on Windows machines.
* Fixes mobile UI incorrectly squishing the Docker image selector on the server settings page.
* Fixes recovery tokens not having a `created_at` value set on them properly when they are created.
* Fixes flawed migration that would not correctly set the month value into schedule crons.
* Fixes incorrect mounting for Docker compose file that would cause error logs to be missing.
### Changed
* Server resource lookups are now cached on the Panel for 20 seconds at a time to reduce the load from multiple clients requesting the same server's stats.
* Bungeecord egg no longer force-enables the query listener.
* Adds page to the dashboard URL to allow easy loading of a specific pagination page rather than resetting back to the first page when refreshing.
* All application API endpoints now correctly support the `?per_page=N` query parameter to specify how many resources to return at once.
## v1.3.1
### Fixed
* Fixes the Rust egg not properly seeding during the upgrade & installation process.
* Fixes backups not being downloadable via the frontend.
* Fixes backup listing showing the wrong number of existing backups based on the current page you're on.
## v1.3.0
### Fixed
* Fixes administrator "Other Servers" toggle being persisted wrongly when signing out and signing into a non-administrator account on the server dashboard.
* Fixes composer failing to run properly in local environments where there is no database connection available once configured.
* Fixes SQL exception caused by the Panel attempting to store null values in the database.
* Fixes validation errors caused by improper defaults when trying to edit system settings in the admin area.
* Fixes console overflow when using smaller-than-default font sizes in Firefox.
* Fixes console text input field having a white background when manually building new assets from the release build due to a missing `babel-macros` definition file.
* Fixes database improperly using a signed `smallint` field rather than an unsigned field which restricted SFTP ports to 32767 or less.
* Fixes server console resize handler to no longer encounter an exception at random that breaks the entire UI.
* Fixes unhandled error caused by entering an invalid IP address or FQDN when creating a new node allocation.
* Fixes unhandled error when Wings would fetch a server configuration from the Panel that uses an Egg with invalid JSON data for the configuration fields.
* Fixes email not being sent to a user when their server is done installing.
### Added
* Adds support for automatically copying SFTP connection details when clicking into the text field.
* Messaging about a node not having any allocations available for deployment has been adjusted to be more understandable by users.
* Adds automated self-upgrade process for Pterodactyl Panel once this version is installed on servers. This allows users to update by using a single command.
* Adds support for specifying a month when creating or modifying a server schedule.
* Adds support for restoring backups (including those in S3 buckets) to a server and optionally deleting all existing files when doing so.
* Adds underlying support for audit logging on servers. Currently this is only used by some internal functionality but will be slowly expanded as time permits to allow more robust logging.
* Adds logic to automatically reset failed server states when Wings is rebooted. This will kick servers out of "installing" and "restoring from backup" states automatically.
### Changed
* Updated to `Laravel 8` and bumped minimum PHP version from `7.3` to `7.4` with PHP `8.0` being the recommended.
* Server state is now stored in a single `status` column within the database rather than multiple different `tinyint` columns.
## v1.2.2
### Fixed
* **[security]** Fixes authentication bypass allowing a user to take control of specific server actions such as executing schedules, rotating database passwords, and viewing or deleting a backup.
## v1.2.1
### Fixed
* Fixes URL-encoding of filenames when working in the filemanager to fix issues when moving, renaming, or deleting files.
* Fixes URL-encoding of email addresses when requesting a password reset.
### Added
* Adds the ability for users to select a base Java Docker image for most Minecraft specific eggs shipped as defaults.
## v1.2.0
### Fixed
* Fixes newest backup being deleted when creating a new one using the schedule tasks, rather than the oldest backup.
* Fixes multiple encoding issues when handling file names in the manager.
* Fixes database password not properly being copied to the clipboard when clicked.
* Fixes failed transfers unintentionally locking a server into a failed state and not properly releasing allocations that were reserved.
* Fixes error box on server pages having an oval refresh button rather than a perfect circle.
* Fixes a bunch of errors and usage issues relating to backups especially when uploading to S3-based systems.
* Fixes HMR breaking navigation in development modes on the frontend.
### Changed
* Updated Paper egg to default to Java 11 as the base docker image.
* Removes the file mode display from the File Manager row listing.
* Updated input UI elements to have thicker borders and more consistent highlighting when active.
* Changed searchbar toggle from `"k"` to `Cmd/Ctrl + "/"` to avoid accidental toggles and be more consistent with other sites.
* Upgrades TailwindCSS to `v2`.
### Added
* Adds support for eggs to define multiple Docker images that can be selected by users (e.g. Java 8 & 11 images for a single egg).
* Adds support for configuring the default interval for failed backups to be pruned from the system to avoid long running backups being incorrectly cleared.
* Adds server transfer output logging to the server console allowing admins to see how a transfer is progressing directly in the UI.
* Adds client API endpoint to download a file from a remote souce. This functionality is not currently expressed in the UI.
## v1.1.3
### Fixed
* Server bulk power actions command will no longer attempt to run commands against installing or suspended servers.
* Fixes the application API throwing an error when attempting to return variables for a server.
* Fixes an error when attempting to install Panel dependencies without specifying an `.env` file due to an unset default timezone.
* Fixes a null value flip in the database migrations.
* Fixes password change endpoint for users allowing a blank value to be provided (even if nothing actually happened).
* Fixes database IP addresses not allowing a `0` in the first octet field.
* Fixes node information being impossible to update if there was a network error during the process. Any errors encountered communicating with Wings are now reported but will not block the actual saving of the changes.
* **[Security]** When 2FA is required on an account the client API endpoints will now properly return an error and the UI will redirect the user to setup 2FA.
* **[Security]** When changing the owner of a server the old owner's JWT is now properly invalidated on Wings.
* Fixes a server error when requesting database information for a server as a subuser and the account is not granted `view_password` permissions.
### Added
* Adds support for basic backup rotation on a server when creating scheduled backup tasks.
* Makes URLs present in the console clickable.
* Adds `chmod` support to the file manager so that users can manually make modifications to file permissions as they need.
### Changed
* UI will no longer show a delete button to users when they're editing themselves.
* Updated logic for bulk power actions to no longer run actions against suspended or installing servers.
## v1.1.2
### Fixed
* Fixes an exception thrown while trying to validate IP access for the client API.
* Fixes command history scrolling not putting the cursor at the end of the line.
* Fixes file manager rows triggering a 404 when middle-clicked to open in a new tab.
## v1.1.1
### Fixed
* Fixes allocation permissions checking on the frontend checking the wrong permission therefore leading to the item never showing up.
* Fixes allocations not updating correctly when added or deleted and switching between pages.
## v1.1.0
This release **requires** `Wings@1.1.0` in order to work properly due to breaking internal API changes.
### Fixed
* Fixes subuser creation/edit modal not submitting correctly when attemping to make modifications.
* Fixes a few remaining issues with multiple egg install scripts.
* Removes the ability for a schedule to have a null name and replaces any existing null names with a randomly generated name.
* Fixes schedules aborting the entire run process if a single schedule encountered an exception. This resolves batches of schedules never running correctly if they occur after a broken schedule.
* Fixes schedules not properly resetting themselves if an exception was encountered during the run.
* Fixes numerous N+1 query run-aways when loading multiple servers via the API.
* Fixes numerous issues with displaying directory and file names in the file manager if they included special characters that could not be decoded properly.
* Fixes CPU pinning not being properly passed along to Wings when updated (this also fixes memory/CPU/disk not passing along correctly as well).
* Fixes spinner not displaying properly when displayed over a modal.
### Added
* Adds ability for users to generate their own additional server allocations via the frontend if enabled.
* Adds the ability for a user to remove un-needed allocations from their server (as long as it is not the primary allocation).
* Adds support for tracking the last 32 sent console commands for a server. Access the history by using the arrow keys when the command field is active.
* Adds S3 specific environment variables allowing for backups to use any S3 compatiable system, not just AWS.
* Adds support for copying a server allocation address to the clipboard when clicked.
* Adds information about the next schedule run time when viewing an individual schedule.
* Adds link to view a server in the admin control panel to the frontend server view when logged in as a root admin.
* Adds support for egg-specific frontend/backend functionality. This is a beta feature meant for internal features at this time.
* Adds back the EULA warning popup when starting a Minecraft server without an accepted EULA.
* Adds missing descriptions for some user permissions on the frontend UI.
### Changed
* Adds Save/Invite button to top of subuser edit/creation modal to reduce the need for scrolling.
* Updated language for server transfers and mounts to be less confusing.
* Wings API endpoint for fetching all servers on a node is now properly paginated to reduce system load when returning hundreds or thousands of servers at once.
* Removes unnecessary Wings API calls when adding/editing/deleting mounts.
* Primary allocation for a server is now always returned, even if the subuser does not have permission to view all of the server allocations.
* Google Analytics frontend code is now only loaded when a valid key is provided.
## v1.0.3
### Fixed
* Fixes bug causing subusers to not be creatable or editable via the frontend for servers.
* Fixes system timezone not being passed along properly to the MySQL connection causing scheduled tasks to run every minute when the MySQL instance and Panel timezone did not line up.
* Fixes listing servers owned by a user in the admin area to actually list their servers.
### Changed
* Adds SameSite `lax` attribute for cookies generated by the Panel.
* Adds better filtering for searching servers in the admin area to better key off name, uuid, or owner username/email.
## v1.0.2
### Added
* Adds support for searching inside the file editor.
* Adds support for manually executing a schedule regardless of if it is currently queued or not.
* Adds an indicator to the schedule UI to show when a schedule is currently processing.
* Adds support for setting the `backup_limit` of a server via the API.
* **[Security]** Adds login throttling to the 2FA verification endpoint.
### Fixed
* Fixes subuser page title missing server name.
* Fixes schedule task `sequence_id` not properly being reset when a schedule's task is deleted.
* Fixes misc. UI bugs throughout the frontend when long text overflows its bounds.
* Fixes user deletion command to properly handle email & ID searching.
* Fixes color issues in the terminal causing certain text & background combinations to be illegible.
* Fixes reCAPTCHA not properly resetting on login failure.
* Fixes error messages not properly resetting between login screens.
* Fixes a UI crash when attempting to create or view a directory or file that contained the `%` somewhere in the name.
### Changed
* Updated the search modal to close itself when the ESC key is pressed.
* Updates the schedule view and editing UI to better display information to users.
* Changed logic powering server searching on the frontend to return more accurate results and return all servers when executing the query as an admin.
* Admin CP link no longer opens in a new tab.
* Mounts will no longer allow a user to mount certain directory combinations. This blocks mounting one server's files into another server, and blocks using the server data directory as a mount destination.
* Cleaned up assorted server build modification code.
* Updates default eggs to have improved install scripts and more consistent container usage.
## v1.0.1
### Fixed
* Fixes 500 error when mounting a mount to a server, and other related errors when handling mounts.
* Ensures that `server_transfers` database is deleted if it already exists to avoid unnecessary error.
* Fixes servers getting marked as "not installed" when modifying their startup arguments.
* Fixes filemanager breadcrumbs being set incorrectly when navigating between files and folders.
### Changed
* Change the requests per minute from 240 to 720 for the client API to avoid unecessarily displaying
"Too Many Requests" errors.
* Added error output to certain commands that will output and terminate the command execution if the database
migrations have not been run correctly for the instance.
## v1.0.0
Pterodactyl 1.0 represents the culmination of over two years of work, almost 2,000 commits, endless bug and feature requests, and a dream that
has been in the making since 2013. 🎉
Due to the sheer size and timeline of this release I've massively truncated the listing below. There are numerous smaller
bug fixes and changes that would simply be too difficult to keep track of here. Please feel free to browse through the releases
tab for this repository to see more specific changes that have been made.
### Added
* Adds a new client-facing API allowing a user to control all aspects of their individual servers, or servers
which they have been granted access to as a subuser.
* Adds the ability for backups to be created for a server both manually and via a scheduled task.
* Adds the ability for users to modify their server allocations on the fly and include notes for each allocation.
* Adds the ability for users to generate recovery tokens for 2FA protected logins which can be used in place of
a code should their device be inaccessible.
* Adds support for transfering servers between Nodes via the Panel.
* Adds the ability to assign specific CPU cores to a server (CPU Pinning) process.
* Server owners can now reinstall their assigned server egg automatically with a button on the frontend.
### Changed
* The entire user frontend has been replaced with a responsive, React backed design implemented using Tailwind CSS.
* Replaces a large amount of complex daemon authentication logic by funneling most API calls through the Panel, and using
JSON Web Tokens where necessary to handle one-time direct authentication with Wings.
* Frontend server listing now includes a toggle to show or hide servers which an administrator has access to, rather
than always showing all servers on the system when logged into an admin account.
* We've replaced Ace Editor on the frontend with a better solution to allow lighter builds and more end-user functionality.
* Server permissions have been overhauled to be both easier to understand in the codebase, and allows plugins to better
hook into the permission system.
### Removed
* Removes large swaths of code complexity and confusing interface designs that caused a lot of pain to new developers
trying to jump into the codebase. We've simplified this to stick to more established Laravel design standards to make
it easy to parse through the project and make contributions.
## v0.7.19 (Derelict Dermodactylus)
### Fixed
* **[Security]** Fixes XSS in the admin area's server owner selection.
## v0.7.18 (Derelict Dermodactylus)
### Fixed
* **[Security]** Re-addressed missed endpoint that would not properly limit a user account to 5 API keys.
* **[Security]** Addresses a Client API vulnerability that would allow a user to list all servers on the system ([`GHSA-6888-7f3w-92jx`](https://github.com/pterodactyl/panel/security/advisories/GHSA-6888-7f3w-92jx))
## v0.7.17 (Derelict Dermodactylus)
### Fixed
* Limited accounts to 5 API keys at a time.
@ -301,7 +669,7 @@ the response from the server `GET` endpoint.
* Nest and Egg listings now show the associated ID in order to make API requests easier.
* Added star indicators to user listing in Admin CP to indicate users who are set as a root admin.
* Creating a new node will now requires a SSL connection if the Panel is configured to use SSL as well.
* Connector error messages due to permissions are now rendered correctly in the UI rather than causing a silent failure.
* Socketio error messages due to permissions are now rendered correctly in the UI rather than causing a silent failure.
* File manager now supports mass deletion option for files and folders.
* Support for CS:GO as a default service option selection.
* Support for GMOD as a default service option selection.
@ -431,7 +799,7 @@ the response from the server `GET` endpoint.
* Changed 2FA login process to be more secure. Previously authentication checking happened on the 2FA post page, now it happens prior and is passed along to the 2FA page to avoid storing any credentials.
### Added
* Connector error messages due to permissions are now rendered correctly in the UI rather than causing a silent failure.
* Socketio error messages due to permissions are now rendered correctly in the UI rather than causing a silent failure.
## v0.7.0-beta.1 (Derelict Dermodactylus)
### Added

View File

@ -1,44 +1,55 @@
# Contributing
We're glad you want to help us out and make this panel the best that it can be! We have a few simple things to follow when making changes to files and adding new features.
We're glad you want to help us out and make this panel the best that it can be! We have a few simple things to follow
when making changes to files and adding new features.
### Development Environment
Please check the [`pterodactyl/development`](https://github.com/pterodactyl/development) repository for a Vagrant &
Docker setup that should run on most macOS and Linux distributions. In the event that your platform is not supported
you're welcome to open a PR, or just take a look at our setup scripts to see what you'll need to successfully develop
with Pterodactyl.
#### Building Assets
Please see [`BUILDING.md`](https://github.com/pterodactyl/panel/blob/develop/BUILDING.md) for details on how to actually
build and run the development server.
### Project Branches
This section mainly applies to those with read/write access to our repositories, but can be helpful for others.
The `develop` branch should always be in a runnable state, and not contain any major breaking features. For the most part, this means you will need to create `feature/` branches in order to add new functionality or change how things work. When making a feature branch, if it is referencing something in the issue tracker, please title the branch `feature/PTDL-###` where `###` is the issue number.
The `develop` branch should always be in a runnable state, and not contain any major breaking features. For the most
part, this means you will need to create `feature/` branches in order to add new functionality or change how things
work. When making a feature branch, if it is referencing something in the issue tracker, please title the branch
`feature/PTDL-###` where `###` is the issue number.
Moving forward all commits from contributors should be in the form of a PR, unless it is something we have previously discussed as being able to be pushed right into `develop`.
All new code should contain tests to ensure their functionality is not unintentionally changed down the road. This
is especially important for any API actions or authentication based controls.
All new code should contain unit tests at a minimum (where applicable). There is a lot of uncovered code currently, so as you are doing things please be looking for places that you can write tests.
### Update the CHANGELOG
When adding something that is new, fixed, changed, or security-related for the next release you should be adding a note to the CHANGELOG. If something is changing within the same version (i.e. fixing a bug introduced but not released) it should _not_ go into the CHANGELOG.
### The CHANGELOG
You should not make any changes to the `CHANGELOG.md` file during your code updates. This is updated by the maintainers
at the time of deployment to include the relevant changes that were made.
### Code Guidelines
We are a `PSR-4` and `PSR-0` compliant project, so please follow those guidelines at a minimum. In addition, StyleCI runs on all of our code to ensure the formatting is standardized across everything. When a PR is made StyleCI will analyze your code and make a pull to that branch if necessary to fix any formatting issues. This project also ships with a PHP-CS configuration file and you are welcome to configure your local environment to make use of that.
We are a `PSR-4` and `PSR-0` compliant project, so please follow those guidelines at a minimum. In addition we run
`php-cs-fixer` on all PRs and releases to enforce a consistent code style. The following command executed on your machine
should show any areas where the code style does not line up correctly.
All class variable declarations should be in alphabetical order, and constructor arguments should be in alphabetical order based on the classname. See the example below for how this should look, or check out any of the `app/Service` files for examples.
```php
class ProcessScheduleService
{
protected $repository;
protected $runnerService;
public function __construct(RunTaskService $runnerService, ScheduleRepositoryInterface $repository)
{
$this->repository = $repository;
$this->runnerService = $runnerService;
}
```
vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff --config .php_cs.dist
```
### Responsible Disclosure
This is a fairly in-depth project and makes use of a lot of parts. We strive to keep everything as secure as possible and welcome you to take a look at the code provided in this project yourself. We do ask that you be considerate of others who are using the software and not publicly disclose security issues without contacting us first by email.
This is a fairly in-depth project and makes use of a lot of parts. We strive to keep everything as secure as possible
and welcome you to take a look at the code provided in this project yourself. We do ask that you be considerate of
others who are using the software and not publicly disclose security issues without contacting us first by email.
We'll make a deal with you: if you contact us by email and we fail to respond to you within a week you are welcome to publicly disclose whatever issue you have found. We understand how frustrating it is when you find something big and no one will respond to you. This holds us to a standard of providing prompt attention to any issues that arise and keeping this community safe.
We'll make a deal with you: if you contact us by email and we fail to respond to you within a week you are welcome to
publicly disclose whatever issue you have found. We understand how frustrating it is when you find something big and
no one will respond to you. This holds us to a standard of providing prompt attention to any issues that arise and
keeping this community safe.
If you've found what you believe is a security issue please email us at `support@pterodactyl.io`.
If you've found what you believe is a security issue please email `dane åt pterodactyl døt io`.
### Where to find Us
You can find us in a couple places online. First and foremost, we're active right here on Github. If you encounter a bug or other problems, open an issue on here for us to take a look at it. We also accept feature requests here as well.
### Contact Us
You can find us in a couple places online. First and foremost, we're active right here on Github. If you encounter a
bug or other problems, open an issue on here for us to take a look at it. We also accept feature requests here as well.
You can also find us on [Discord](https://pterodactyl.io/discord). In the event that you need to get in contact with us privately feel free to contact us at `support@pterodactyl.io`. Try not to email us with requests for support regarding the panel, we'll probably just direct you to our Discord.
You can also find us on [Discord](https://discord.gg/pterodactyl).

View File

@ -1,14 +0,0 @@
# Pterodactyl Panel Contributors
This panel would not be possible without the support of our wonderful community of
developers who provide code enhancements, new features, and bug fixes to make this panel
the best that is can be. You can view a full listing of contributors [here](https://github.com/Pterodactyl/Panel/graphs/contributors).
Dane Everitt [@DaneEveritt](https://github.com/Pterodactyl/Panel/commits?author=DaneEveritt)
Dylan Seidt [@DDynamic](https://github.com/Pterodactyl/Panel/commits?author=DDynamic)
[@nikkiii](https://github.com/Pterodactyl/Panel/commits?author=nikkiii)
# Get Involved
See our `CONTRIBUTING.md` document for information on how to get started. Once you've submitted some code feel free to
modify this file and add your name to the list. Please follow the format above for your name and linking to your contributions.

View File

@ -1,36 +1,39 @@
FROM php:7.4-fpm-alpine
# Stage 0:
# Build the assets that are needed for the frontend. This build stage is then discarded
# since we won't need NodeJS anymore in the future. This Docker image ships a final production
# level distribution of Pterodactyl.
FROM --platform=$TARGETOS/$TARGETARCH mhart/alpine-node:14
WORKDIR /app
RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot yarn; \
docker-php-ext-install bcmath; \
docker-php-ext-install gd; \
docker-php-ext-install mbstring; \
docker-php-ext-install pdo; \
docker-php-ext-install pdo_mysql; \
docker-php-ext-install tokenizer; \
docker-php-ext-install xml; \
docker-php-ext-configure zip --with-libzip=/usr/include; \
docker-php-ext-install zip; \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY . ./
RUN yarn install --frozen-lockfile \
&& yarn run build:production
RUN cp .env.example .env \
&& composer install --no-dev --optimize-autoloader \
&& rm .env \
&& chown -R nginx:nginx . && chmod -R 777 storage/* bootstrap/cache
# Stage 1:
# Build the actual container with all of the needed PHP dependencies that will run the application.
FROM --platform=$TARGETOS/$TARGETARCH php:7.4-fpm-alpine
WORKDIR /app
COPY . ./
COPY --from=0 /app/public/assets ./public/assets
RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot \
&& docker-php-ext-configure zip \
&& docker-php-ext-install bcmath gd pdo_mysql zip \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& cp .env.example .env \
&& mkdir -p bootstrap/cache/ storage/logs storage/framework/sessions storage/framework/views storage/framework/cache \
&& chmod 777 -R bootstrap storage \
&& composer install --no-dev --optimize-autoloader \
&& rm -rf .env bootstrap/cache/*.php \
&& chown -R nginx:nginx .
RUN cp docker/default.conf /etc/nginx/conf.d/default.conf \
&& cat docker/www.conf > /usr/local/etc/php-fpm.d/www.conf \
&& rm /usr/local/etc/php-fpm.d/www.conf.default \
&& cat docker/supervisord.conf > /etc/supervisord.conf \
&& echo "* * * * * /usr/local/bin/php /app/artisan schedule:run >> /dev/null 2>&1" >> /var/spool/cron/crontabs/root \
&& sed -i s/ssl_session_cache/#ssl_session_cache/g /etc/nginx/nginx.conf \
&& mkdir -p /var/run/php /var/run/nginx
RUN rm /usr/local/etc/php-fpm.conf \
&& echo "* * * * * /usr/local/bin/php /app/artisan schedule:run >> /dev/null 2>&1" >> /var/spool/cron/crontabs/root \
&& sed -i s/ssl_session_cache/#ssl_session_cache/g /etc/nginx/nginx.conf \
&& mkdir -p /var/run/php /var/run/nginx
COPY .github/docker/default.conf /etc/nginx/http.d/default.conf
COPY .github/docker/www.conf /usr/local/etc/php-fpm.conf
COPY .github/docker/supervisord.conf /etc/supervisord.conf
EXPOSE 80 443
ENTRYPOINT ["/bin/ash", "docker/entrypoint.sh"]
ENTRYPOINT ["/bin/ash", ".github/docker/entrypoint.sh"]
CMD [ "supervisord", "-n", "-c", "/etc/supervisord.conf" ]

View File

@ -1,7 +1,7 @@
# The MIT License (MIT)
```
Copyright (c) 2015 - 2020 Dane Everitt <dane@daneeveritt.com>
Copyright (c) 2015 - 2021 Dane Everitt <dane@daneeveritt.com> and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,12 +1,13 @@
[![Logo Image](https://cdn.pterodactyl.io/logos/new/pterodactyl_logo.png)](https://pterodactyl.io)
[![Build status](https://img.shields.io/travis/pterodactyl/panel/develop.svg?style=flat-square)](https://travis-ci.org/pterodactyl/panel)
[![Codecov](https://img.shields.io/codecov/c/github/pterodactyl/panel/develop.svg?style=flat-square)](https://codecov.io/gh/Pterodactyl/Panel)
[![Discord](https://img.shields.io/discord/122900397965705216.svg?style=flat-square&label=Discord)](https://pterodactyl.io/discord)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/pterodactyl/panel/tests?label=Tests&style=for-the-badge)
![Discord](https://img.shields.io/discord/122900397965705216?label=Discord&logo=Discord&logoColor=white&style=for-the-badge)
![GitHub Releases](https://img.shields.io/github/downloads/pterodactyl/panel/latest/total?style=for-the-badge)
![GitHub contributors](https://img.shields.io/github/contributors/pterodactyl/panel?style=for-the-badge)
# Pterodactyl Panel
Pterodactyl is an open-source game server management panel built with PHP 7, React, and Go. Designed with security
in mind, Pterodactyl runs all game servers in isolated Docker container while exposing a beautiful and intuitive
in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive
UI to end users.
Stop settling for less. Make game servers a first class citizen on your platform.
@ -14,17 +15,29 @@ Stop settling for less. Make game servers a first class citizen on your platform
![Image](https://cdn.pterodactyl.io/site-assets/pterodactyl_v1_demo.gif)
## Sponsors
I would like to extend my sincere thanks to the following sponsors for helping find Pterodactyl's developement.
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/DaneEveritt)
| Company | About |
| ------- | ----- |
| [**WISP**](https://wisp.gg) | Extra features. |
| [**MixmlHosting**](https://mixmlhosting.com) | MixmlHosting provides high quality Virtual Private Servers along with game servers, all at a affordable price. |
| [**BisectHosting**](https://www.bisecthosting.com/) | BisectHosting provides Minecraft, Valheim and other server hosting services with the highest reliability and lightning fast support since 2012. |
| [**Bloom.host**](https://bloom.host) | Bloom.host offers dedicated core VPS and Minecraft hosting with Ryzen 9 processors. With owned-hardware, we offer truly unbeatable prices on high-performance hosting. |
| [**VersatileNode**](https://versatilenode.com/) | Looking to host a minecraft server, vps, or a website? VersatileNode is one of the most affordable hosting providers to provide quality yet cheap services with incredible support. |
| [**MineStrator**](https://minestrator.com/) | Looking for a French highend hosting company for you minecraft server? More than 14,000 members on our discord, trust us. |
| [**DedicatedMC**](https://dedicatedmc.io/) | DedicatedMC provides Raw Power hosting at affordable pricing, making sure to never compromise on your performance and giving you the best performance money can buy. |
| [**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! |
| [**XCORE-SERVER.de**](https://xcore-server.de/) | XCORE-SERVER.de offers High-End Servers for hosting and gaming since 2012. Fast, excellent and well-known for eSports Gaming. |
| [**XCORE**](https://xcore-server.de/) | XCORE offers High-End Servers for hosting and gaming since 2012. Fast, excellent and well-known for eSports Gaming. |
| [**RoyaleHosting**](https://royalehosting.net/) | Build your dreams and deploy them with RoyaleHostings reliable servers and network. Easy to use, provisioned in a couple of minutes. |
| [**Spill Hosting**](https://spillhosting.no/) | Spill Hosting is a Norwegian hosting service, which aims for inexpensive services on quality servers. Premium i9-9900K processors will run your game like a dream. |
| [**DeinServerHost**](https://deinserverhost.de/) | DeinServerHost offers Dedicated, vps and Gameservers for many popular Games like Minecraft and Rust in Germany since 2013. |
| [**HostBend**](https://hostbend.com/) | HostBend offers a variety of solutions for developers, students, and others who have a tight budget but don't want to compromise quality and support. |
| [**Capitol Hosting Solutions**](https://chs.gg/) | CHS is *the* budget friendly hosting company for Australian and American gamers, offering a variety of plans from Web Hosting to Game Servers; Custom Solutions too! |
| [**ByteAnia**](https://byteania.com/?utm_source=pterodactyl) | ByteAnia offers the best performing and most affordable **Ryzen 5000 Series hosting** on the market for *unbeatable prices*! |
| [**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. |
| [**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.|
| [**RocketNode**](https://rocketnode.net) | RocketNode is a VPS and Game Server provider that offers the best performing VPS and Game hosting Solutions at affordable prices! |
| [**HostEZ**](https://hostez.io) | Providing North America Valheim, Minecraft and other popular games with low latency, high uptime and maximum availability. EZ! |
## Documentation
* [Panel Documentation](https://pterodactyl.io/panel/1.0/getting_started.html)
@ -55,7 +68,6 @@ and there are plenty more games available provided by the community. Some of the
* San Andreas: MP
* Pocketmine MP
* Squad
* FiveM
* Xonotic
* Starmade
* Discord ATLBot, and most other Node.js/Python discord bots
@ -63,7 +75,7 @@ and there are plenty more games available provided by the community. Some of the
## License
```
Copyright (c) 2015 - 2020 Dane Everitt <dane@daneeveritt.com> & Contributors
Copyright (c) 2015 - 2021 Dane Everitt <dane@daneeveritt.com> and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -5,14 +5,13 @@ The following versions of Pterodactyl are receiving active support and maintenan
| Panel | Daemon | Supported |
| ----- | ------------ | ------------------ |
| 1.0.x | wings@1.0.x | :white_check_mark: |
| 0.7.x | daemon@0.6.x | :white_check_mark: |
| 0.6.x | daemon@0.5.x | :x: |
| 0.5.x | daemon@0.4.x | :x: |
| 1.6.x | wings@1.5.x | :white_check_mark: |
| 0.7.x | daemon@0.6.x | :x: |
## Reporting a Vulnerability
Please reach out directly to any project team member on Discord when reporting a security vulnerability, or you can send an email to `dane [ät] pterodactyl.io`.
Please reach out directly to any project team member on Discord when reporting a security vulnerability, or you can send an email to `dane@pterodactyl.io`.
We make every effort to respond as soon as possible, although it may take a day or two for us to sync internally and determine the severity of the report and its impact. Please, _do not_ use a public facing channel or GitHub issues to report sensitive security issues.

17
Vagrantfile vendored
View File

@ -1,17 +0,0 @@
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.synced_folder "./", "/var/www/html/pterodactyl",
owner: "www-data", group: "www-data"
config.vm.provision :shell, path: ".dev/vagrant/provision.sh"
config.vm.network :private_network, ip: "192.168.50.2"
config.vm.network :forwarded_port, guest: 80, host: 50080
config.vm.network :forwarded_port, guest: 8025, host: 58025
config.vm.network :forwarded_port, guest: 3306, host: 53306
# Config for the vagrant-dns plugin (https://github.com/BerlinVagrant/vagrant-dns)
config.dns.tld = "test"
config.dns.patterns = [/^pterodactyl.test$/]
end

View File

@ -12,6 +12,7 @@ namespace Pterodactyl\Console\Commands\Environment;
use DateTimeZone;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Validation\Factory as ValidatorFactory;
use Pterodactyl\Traits\Commands\EnvironmentWriterTrait;
use Illuminate\Contracts\Config\Repository as ConfigRepository;
@ -19,13 +20,13 @@ class AppSettingsCommand extends Command
{
use EnvironmentWriterTrait;
const ALLOWED_CACHE_DRIVERS = [
public const ALLOWED_CACHE_DRIVERS = [
'redis' => 'Redis (recommended)',
'memcached' => 'Memcached',
'file' => 'Filesystem',
];
const ALLOWED_SESSION_DRIVERS = [
public const ALLOWED_SESSION_DRIVERS = [
'redis' => 'Redis (recommended)',
'memcached' => 'Memcached',
'database' => 'MySQL Database',
@ -33,7 +34,7 @@ class AppSettingsCommand extends Command
'cookie' => 'Cookie',
];
const ALLOWED_QUEUE_DRIVERS = [
public const ALLOWED_QUEUE_DRIVERS = [
'redis' => 'Redis (recommended)',
'database' => 'MySQL Database',
'sync' => 'Sync',
@ -77,16 +78,14 @@ class AppSettingsCommand extends Command
/**
* AppSettingsCommand constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Console\Kernel $command
*/
public function __construct(ConfigRepository $config, Kernel $command)
public function __construct(ConfigRepository $config, Kernel $command, ValidatorFactory $validator)
{
parent::__construct();
$this->command = $command;
$this->config = $config;
$this->command = $command;
$this->validator = $validator;
}
/**
@ -102,48 +101,67 @@ class AppSettingsCommand extends Command
$this->output->comment(trans('command/messages.environment.app.author_help'));
$this->variables['APP_SERVICE_AUTHOR'] = $this->option('author') ?? $this->ask(
trans('command/messages.environment.app.author'), $this->config->get('pterodactyl.service.author', 'unknown@unknown.com')
);
trans('command/messages.environment.app.author'),
$this->config->get('pterodactyl.service.author', 'unknown@unknown.com')
);
$validator = $this->validator->make(
['email' => $this->variables['APP_SERVICE_AUTHOR']],
['email' => 'email']
);
if ($validator->fails()) {
foreach ($validator->errors()->all() as $error) {
$this->output->error($error);
}
return 1;
}
$this->output->comment(trans('command/messages.environment.app.app_url_help'));
$this->variables['APP_URL'] = $this->option('url') ?? $this->ask(
trans('command/messages.environment.app.app_url'), $this->config->get('app.url', 'http://example.org')
);
trans('command/messages.environment.app.app_url'),
$this->config->get('app.url', 'http://example.org')
);
$this->output->comment(trans('command/messages.environment.app.timezone_help'));
$this->variables['APP_TIMEZONE'] = $this->option('timezone') ?? $this->anticipate(
trans('command/messages.environment.app.timezone'),
DateTimeZone::listIdentifiers(DateTimeZone::ALL),
$this->config->get('app.timezone')
);
trans('command/messages.environment.app.timezone'),
DateTimeZone::listIdentifiers(DateTimeZone::ALL),
$this->config->get('app.timezone')
);
$selected = $this->config->get('cache.default', 'redis');
$this->variables['CACHE_DRIVER'] = $this->option('cache') ?? $this->choice(
trans('command/messages.environment.app.cache_driver'),
self::ALLOWED_CACHE_DRIVERS,
array_key_exists($selected, self::ALLOWED_CACHE_DRIVERS) ? $selected : null
);
trans('command/messages.environment.app.cache_driver'),
self::ALLOWED_CACHE_DRIVERS,
array_key_exists($selected, self::ALLOWED_CACHE_DRIVERS) ? $selected : null
);
$selected = $this->config->get('session.driver', 'redis');
$this->variables['SESSION_DRIVER'] = $this->option('session') ?? $this->choice(
trans('command/messages.environment.app.session_driver'),
self::ALLOWED_SESSION_DRIVERS,
array_key_exists($selected, self::ALLOWED_SESSION_DRIVERS) ? $selected : null
);
trans('command/messages.environment.app.session_driver'),
self::ALLOWED_SESSION_DRIVERS,
array_key_exists($selected, self::ALLOWED_SESSION_DRIVERS) ? $selected : null
);
$selected = $this->config->get('queue.default', 'redis');
$this->variables['QUEUE_CONNECTION'] = $this->option('queue') ?? $this->choice(
trans('command/messages.environment.app.queue_driver'),
self::ALLOWED_QUEUE_DRIVERS,
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
);
trans('command/messages.environment.app.queue_driver'),
self::ALLOWED_QUEUE_DRIVERS,
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
);
if (! is_null($this->option('settings-ui'))) {
if (!is_null($this->option('settings-ui'))) {
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->option('settings-ui') == 'true' ? 'false' : 'true';
} else {
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->confirm(trans('command/messages.environment.app.settings'), true) ? 'false' : 'true';
}
// Make sure session cookies are set as "secure" when using HTTPS
if (strpos($this->variables['APP_URL'], 'https://') === 0) {
$this->variables['SESSION_SECURE_COOKIE'] = 'true';
}
$this->checkForRedis();
$this->writeToEnvironment($this->variables);
@ -166,11 +184,12 @@ class AppSettingsCommand extends Command
$this->output->note(trans('command/messages.environment.app.using_redis'));
$this->variables['REDIS_HOST'] = $this->option('redis-host') ?? $this->ask(
trans('command/messages.environment.app.redis_host'), $this->config->get('database.redis.default.host')
);
trans('command/messages.environment.app.redis_host'),
$this->config->get('database.redis.default.host')
);
$askForRedisPassword = true;
if (! empty($this->config->get('database.redis.default.password'))) {
if (!empty($this->config->get('database.redis.default.password'))) {
$this->variables['REDIS_PASSWORD'] = $this->config->get('database.redis.default.password');
$askForRedisPassword = $this->confirm(trans('command/messages.environment.app.redis_pass_defined'));
}
@ -178,8 +197,8 @@ class AppSettingsCommand extends Command
if ($askForRedisPassword) {
$this->output->comment(trans('command/messages.environment.app.redis_pass_help'));
$this->variables['REDIS_PASSWORD'] = $this->option('redis-pass') ?? $this->output->askHidden(
trans('command/messages.environment.app.redis_password')
);
trans('command/messages.environment.app.redis_password')
);
}
if (empty($this->variables['REDIS_PASSWORD'])) {
@ -187,7 +206,8 @@ class AppSettingsCommand extends Command
}
$this->variables['REDIS_PORT'] = $this->option('redis-port') ?? $this->ask(
trans('command/messages.environment.app.redis_port'), $this->config->get('database.redis.default.port')
);
trans('command/messages.environment.app.redis_port'),
$this->config->get('database.redis.default.port')
);
}
}

View File

@ -57,10 +57,6 @@ class DatabaseSettingsCommand extends Command
/**
* DatabaseSettingsCommand constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Database\DatabaseManager $database
* @param \Illuminate\Contracts\Console\Kernel $console
*/
public function __construct(ConfigRepository $config, DatabaseManager $database, Kernel $console)
{
@ -82,24 +78,28 @@ class DatabaseSettingsCommand extends Command
{
$this->output->note(trans('command/messages.environment.database.host_warning'));
$this->variables['DB_HOST'] = $this->option('host') ?? $this->ask(
trans('command/messages.environment.database.host'), $this->config->get('database.connections.mysql.host', '127.0.0.1')
);
trans('command/messages.environment.database.host'),
$this->config->get('database.connections.mysql.host', '127.0.0.1')
);
$this->variables['DB_PORT'] = $this->option('port') ?? $this->ask(
trans('command/messages.environment.database.port'), $this->config->get('database.connections.mysql.port', 3306)
);
trans('command/messages.environment.database.port'),
$this->config->get('database.connections.mysql.port', 3306)
);
$this->variables['DB_DATABASE'] = $this->option('database') ?? $this->ask(
trans('command/messages.environment.database.database'), $this->config->get('database.connections.mysql.database', 'panel')
);
trans('command/messages.environment.database.database'),
$this->config->get('database.connections.mysql.database', 'panel')
);
$this->output->note(trans('command/messages.environment.database.username_warning'));
$this->variables['DB_USERNAME'] = $this->option('username') ?? $this->ask(
trans('command/messages.environment.database.username'), $this->config->get('database.connections.mysql.username', 'pterodactyl')
);
trans('command/messages.environment.database.username'),
$this->config->get('database.connections.mysql.username', 'pterodactyl')
);
$askForMySQLPassword = true;
if (! empty($this->config->get('database.connections.mysql.password')) && $this->input->isInteractive()) {
if (!empty($this->config->get('database.connections.mysql.password')) && $this->input->isInteractive()) {
$this->variables['DB_PASSWORD'] = $this->config->get('database.connections.mysql.password');
$askForMySQLPassword = $this->confirm(trans('command/messages.environment.database.password_defined'));
}

View File

@ -37,6 +37,7 @@ class EmailSettingsCommand extends Command
{--encryption=}
{--host=}
{--port=}
{--endpoint=}
{--username=}
{--password=}';
@ -47,8 +48,6 @@ class EmailSettingsCommand extends Command
/**
* EmailSettingsCommand constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
*/
public function __construct(ConfigRepository $config)
{
@ -65,13 +64,15 @@ class EmailSettingsCommand extends Command
public function handle()
{
$this->variables['MAIL_DRIVER'] = $this->option('driver') ?? $this->choice(
trans('command/messages.environment.mail.ask_driver'), [
trans('command/messages.environment.mail.ask_driver'),
[
'smtp' => 'SMTP Server',
'mail' => 'PHP\'s Internal Mail Function',
'mailgun' => 'Mailgun Transactional Email',
'mandrill' => 'Mandrill Transactional Email',
'postmark' => 'Postmarkapp Transactional Email',
], $this->config->get('mail.driver', 'smtp')
],
$this->config->get('mail.driver', 'smtp')
);
$method = 'setup' . studly_case($this->variables['MAIL_DRIVER']) . 'DriverVariables';
@ -80,16 +81,20 @@ class EmailSettingsCommand extends Command
}
$this->variables['MAIL_FROM'] = $this->option('email') ?? $this->ask(
trans('command/messages.environment.mail.ask_mail_from'), $this->config->get('mail.from.address')
);
trans('command/messages.environment.mail.ask_mail_from'),
$this->config->get('mail.from.address')
);
$this->variables['MAIL_FROM_NAME'] = $this->option('from') ?? $this->ask(
trans('command/messages.environment.mail.ask_mail_name'), $this->config->get('mail.from.name')
);
trans('command/messages.environment.mail.ask_mail_name'),
$this->config->get('mail.from.name')
);
$this->variables['MAIL_ENCRYPTION'] = $this->option('encryption') ?? $this->choice(
trans('command/messages.environment.mail.ask_encryption'), ['tls' => 'TLS', 'ssl' => 'SSL', '' => 'None'], $this->config->get('mail.encryption', 'tls')
);
trans('command/messages.environment.mail.ask_encryption'),
['tls' => 'TLS', 'ssl' => 'SSL', '' => 'None'],
$this->config->get('mail.encryption', 'tls')
);
$this->writeToEnvironment($this->variables);
@ -103,20 +108,23 @@ class EmailSettingsCommand extends Command
private function setupSmtpDriverVariables()
{
$this->variables['MAIL_HOST'] = $this->option('host') ?? $this->ask(
trans('command/messages.environment.mail.ask_smtp_host'), $this->config->get('mail.host')
);
trans('command/messages.environment.mail.ask_smtp_host'),
$this->config->get('mail.host')
);
$this->variables['MAIL_PORT'] = $this->option('port') ?? $this->ask(
trans('command/messages.environment.mail.ask_smtp_port'), $this->config->get('mail.port')
);
trans('command/messages.environment.mail.ask_smtp_port'),
$this->config->get('mail.port')
);
$this->variables['MAIL_USERNAME'] = $this->option('username') ?? $this->ask(
trans('command/messages.environment.mail.ask_smtp_username'), $this->config->get('mail.username')
);
trans('command/messages.environment.mail.ask_smtp_username'),
$this->config->get('mail.username')
);
$this->variables['MAIL_PASSWORD'] = $this->option('password') ?? $this->secret(
trans('command/messages.environment.mail.ask_smtp_password')
);
trans('command/messages.environment.mail.ask_smtp_password')
);
}
/**
@ -125,12 +133,19 @@ class EmailSettingsCommand extends Command
private function setupMailgunDriverVariables()
{
$this->variables['MAILGUN_DOMAIN'] = $this->option('host') ?? $this->ask(
trans('command/messages.environment.mail.ask_mailgun_domain'), $this->config->get('services.mailgun.domain')
);
trans('command/messages.environment.mail.ask_mailgun_domain'),
$this->config->get('services.mailgun.domain')
);
$this->variables['MAILGUN_SECRET'] = $this->option('password') ?? $this->ask(
trans('command/messages.environment.mail.ask_mailgun_secret'), $this->config->get('services.mailgun.secret')
);
trans('command/messages.environment.mail.ask_mailgun_secret'),
$this->config->get('services.mailgun.secret')
);
$this->variables['MAILGUN_ENDPOINT'] = $this->option('endpoint') ?? $this->ask(
trans('command/messages.environment.mail.ask_mailgun_endpoint'),
$this->config->get('services.mailgun.endpoint')
);
}
/**
@ -139,8 +154,9 @@ class EmailSettingsCommand extends Command
private function setupMandrillDriverVariables()
{
$this->variables['MANDRILL_SECRET'] = $this->option('password') ?? $this->ask(
trans('command/messages.environment.mail.ask_mandrill_secret'), $this->config->get('services.mandrill.secret')
);
trans('command/messages.environment.mail.ask_mandrill_secret'),
$this->config->get('services.mandrill.secret')
);
}
/**
@ -152,7 +168,8 @@ class EmailSettingsCommand extends Command
$this->variables['MAIL_HOST'] = 'smtp.postmarkapp.com';
$this->variables['MAIL_PORT'] = 587;
$this->variables['MAIL_USERNAME'] = $this->variables['MAIL_PASSWORD'] = $this->option('username') ?? $this->ask(
trans('command/messages.environment.mail.ask_postmark_username'), $this->config->get('mail.username')
);
trans('command/messages.environment.mail.ask_postmark_username'),
$this->config->get('mail.username')
);
}
}

View File

@ -37,9 +37,6 @@ class InfoCommand extends Command
/**
* VersionCommand constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService
*/
public function __construct(ConfigRepository $config, SoftwareVersionService $versionService)
{
@ -65,7 +62,7 @@ class InfoCommand extends Command
$this->output->title('Application Configuration');
$this->table([], [
['Environment', $this->formatText($this->config->get('app.env'), $this->config->get('app.env') === 'production' ?: 'bg=red')],
['Debug Mode', $this->formatText($this->config->get('app.debug') ? 'Yes' : 'No', ! $this->config->get('app.debug') ?: 'bg=red')],
['Debug Mode', $this->formatText($this->config->get('app.debug') ? 'Yes' : 'No', !$this->config->get('app.debug') ?: 'bg=red')],
['Installation URL', $this->config->get('app.url')],
['Installation Directory', base_path()],
['Timezone', $this->config->get('app.timezone')],
@ -104,6 +101,7 @@ class InfoCommand extends Command
*
* @param string $value
* @param string $opts
*
* @return string
*/
private function formatText($value, $opts = '')

View File

@ -42,9 +42,6 @@ class DeleteLocationCommand extends Command
/**
* DeleteLocationCommand constructor.
*
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $repository
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
*/
public function __construct(
LocationDeletionService $deletionService,
@ -66,8 +63,9 @@ class DeleteLocationCommand extends Command
{
$this->locations = $this->locations ?? $this->repository->all();
$short = $this->option('short') ?? $this->anticipate(
trans('command/messages.location.ask_short'), $this->locations->pluck('short')->toArray()
);
trans('command/messages.location.ask_short'),
$this->locations->pluck('short')->toArray()
);
$location = $this->locations->where('short', $short)->first();
if (is_null($location)) {

View File

@ -33,8 +33,6 @@ class MakeLocationCommand extends Command
/**
* Create a new command instance.
*
* @param \Pterodactyl\Services\Locations\LocationCreationService $creationService
*/
public function __construct(LocationCreationService $creationService)
{

View File

@ -9,7 +9,7 @@ use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
class CleanServiceBackupFilesCommand extends Command
{
const BACKUP_THRESHOLD_MINUTES = 5;
public const BACKUP_THRESHOLD_MINUTES = 5;
/**
* @var string
@ -28,8 +28,6 @@ class CleanServiceBackupFilesCommand extends Command
/**
* CleanServiceBackupFilesCommand constructor.
*
* @param \Illuminate\Contracts\Filesystem\Factory $filesystem
*/
public function __construct(FilesystemFactory $filesystem)
{

View File

@ -12,29 +12,26 @@ class PruneOrphanedBackupsCommand extends Command
/**
* @var string
*/
protected $signature = 'p:maintenance:prune-backups {--since-minutes=30}';
protected $signature = 'p:maintenance:prune-backups {--prune-age=}';
/**
* @var string
*/
protected $description = 'Marks all backups that have not completed in the last "n" minutes as being failed.';
/**
* @param \Pterodactyl\Repositories\Eloquent\BackupRepository $repository
*/
public function handle(BackupRepository $repository)
{
$since = $this->option('since-minutes');
if (! is_digit($since)) {
throw new InvalidArgumentException('The --since-minutes option must be a valid numeric digit.');
$since = $this->option('prune-age') ?? config('backups.prune_age', 360);
if (!$since || !is_digit($since)) {
throw new InvalidArgumentException('The "--prune-age" argument must be a value greater than 0.');
}
$query = $repository->getBuilder()
->whereNull('completed_at')
->whereDate('created_at', '<=', CarbonImmutable::now()->subMinutes($since));
->where('created_at', '<=', CarbonImmutable::now()->subMinutes($since)->toDateTimeString());
$count = $query->count();
if (! $count) {
if (!$count) {
$this->info('There are no orphaned backups to be marked as failed.');
return;

View File

@ -1,58 +0,0 @@
<?php
namespace Pterodactyl\Console\Commands\Migration;
use Pterodactyl\Models\ApiKey;
use Illuminate\Console\Command;
use Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface;
class CleanOrphanedApiKeysCommand extends Command
{
/**
* @var \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface
*/
private $repository;
/**
* @var string
*/
protected $signature = 'p:migration:clean-orphaned-keys';
/**
* @var string
*/
protected $description = 'Cleans API keys from the database that are not assigned a specific role.';
/**
* CleanOrphanedApiKeysCommand constructor.
*
* @param \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface $repository
*/
public function __construct(ApiKeyRepositoryInterface $repository)
{
parent::__construct();
$this->repository = $repository;
}
/**
* Delete all orphaned API keys from the database when upgrading from 0.6 to 0.7.
*
* @return void|null
*/
public function handle()
{
$count = $this->repository->findCountWhere([['key_type', '=', ApiKey::TYPE_NONE]]);
$continue = $this->confirm(
'This action will remove ' . $count . ' keys from the database. Are you sure you wish to continue?', false
);
if (! $continue) {
return null;
}
$this->info('Deleting keys...');
$this->repository->deleteWhere([['key_type', '=', ApiKey::TYPE_NONE]]);
$this->info('Keys were successfully deleted.');
}
}

View File

@ -12,13 +12,13 @@ class KeyGenerateCommand extends BaseKeyGenerateCommand
*/
public function handle()
{
if (! empty(config('app.key')) && $this->input->isInteractive()) {
$this->output->warning(trans('command/messages.key.warning'));
if (! $this->confirm(trans('command/messages.key.confirm'))) {
if (!empty(config('app.key')) && $this->input->isInteractive()) {
$this->output->warning('It appears you have already configured an application encryption key. Continuing with this process with overwrite that key and cause data corruption for any existing encrypted data. DO NOT CONTINUE UNLESS YOU KNOW WHAT YOU ARE DOING.');
if (!$this->confirm('I understand the consequences of performing this command and accept all responsibility for the loss of encrypted data.')) {
return;
}
if (! $this->confirm(trans('command/messages.key.final_confirm'))) {
if (!$this->confirm('Are you sure you wish to continue? Changing the application encryption key WILL CAUSE DATA LOSS.')) {
return;
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace Pterodactyl\Console\Commands\Overrides;
use Pterodactyl\Console\RequiresDatabaseMigrations;
use Illuminate\Database\Console\Seeds\SeedCommand as BaseSeedCommand;
class SeedCommand extends BaseSeedCommand
{
use RequiresDatabaseMigrations;
/**
* Block someone from running this seed command if they have not completed
* the migration process.
*/
public function handle()
{
if (!$this->hasCompletedMigrations()) {
$this->showMigrationWarning();
return;
}
parent::handle();
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace Pterodactyl\Console\Commands\Overrides;
use Pterodactyl\Console\RequiresDatabaseMigrations;
use Illuminate\Foundation\Console\UpCommand as BaseUpCommand;
class UpCommand extends BaseUpCommand
{
use RequiresDatabaseMigrations;
/**
* Block someone from running this up command if they have not completed
* the migration process.
*/
public function handle()
{
if (!$this->hasCompletedMigrations()) {
$this->showMigrationWarning();
return;
}
parent::handle();
}
}

View File

@ -1,62 +1,37 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Console\Commands\Schedule;
use Cake\Chronos\Chronos;
use Exception;
use Throwable;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Pterodactyl\Models\Schedule;
use Illuminate\Support\Facades\Log;
use Pterodactyl\Services\Schedules\ProcessScheduleService;
use Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface;
class ProcessRunnableCommand extends Command
{
/**
* @var string
*/
protected $description = 'Process schedules in the database and determine which are ready to run.';
/**
* @var \Pterodactyl\Services\Schedules\ProcessScheduleService
*/
protected $processScheduleService;
/**
* @var \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface
*/
protected $repository;
protected $signature = 'p:schedule:process';
/**
* @var string
*/
protected $signature = 'p:schedule:process';
/**
* ProcessRunnableCommand constructor.
*
* @param \Pterodactyl\Services\Schedules\ProcessScheduleService $processScheduleService
* @param \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface $repository
*/
public function __construct(ProcessScheduleService $processScheduleService, ScheduleRepositoryInterface $repository)
{
parent::__construct();
$this->processScheduleService = $processScheduleService;
$this->repository = $repository;
}
protected $description = 'Process schedules in the database and determine which are ready to run.';
/**
* Handle command execution.
*/
public function handle()
{
$schedules = $this->repository->getSchedulesToProcess(Chronos::now()->toAtomString());
$schedules = Schedule::query()->with('tasks')
->where('is_active', true)
->where('is_processing', false)
->whereRaw('next_run_at <= NOW()')
->get();
if ($schedules->count() < 1) {
$this->line('There are no scheduled tasks for servers that need to be run.');
@ -64,23 +39,40 @@ class ProcessRunnableCommand extends Command
}
$bar = $this->output->createProgressBar(count($schedules));
$schedules->each(function ($schedule) use ($bar) {
if ($schedule->tasks instanceof Collection && count($schedule->tasks) > 0) {
$this->processScheduleService->handle($schedule);
if ($this->input->isInteractive()) {
$bar->clear();
$this->line(trans('command/messages.schedule.output_line', [
'schedule' => $schedule->name,
'hash' => $schedule->hashid,
]));
}
}
foreach ($schedules as $schedule) {
$bar->clear();
$this->processSchedule($schedule);
$bar->advance();
$bar->display();
});
}
$this->line('');
}
/**
* Processes a given schedule and logs and errors encountered the console output. This should
* never throw an exception out, otherwise you'll end up killing the entire run group causing
* any other schedules to not process correctly.
*
* @see https://github.com/pterodactyl/panel/issues/2609
*/
protected function processSchedule(Schedule $schedule)
{
if ($schedule->tasks->isEmpty()) {
return;
}
try {
$this->getLaravel()->make(ProcessScheduleService::class)->handle($schedule);
$this->line(trans('command/messages.schedule.output_line', [
'schedule' => $schedule->name,
'hash' => $schedule->hashid,
]));
} catch (Throwable | Exception $exception) {
Log::error($exception, ['schedule_id' => $schedule->id]);
$this->error("An error was encountered while processing Schedule #{$schedule->id}: " . $exception->getMessage());
}
}
}

View File

@ -2,30 +2,15 @@
namespace Pterodactyl\Console\Commands\Server;
use Pterodactyl\Models\Server;
use Illuminate\Console\Command;
use GuzzleHttp\Exception\RequestException;
use Illuminate\Validation\ValidationException;
use Illuminate\Validation\Factory as ValidatorFactory;
use Pterodactyl\Repositories\Wings\DaemonPowerRepository;
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
class BulkPowerActionCommand extends Command
{
/**
* @var \Pterodactyl\Repositories\Wings\DaemonPowerRepository
*/
private $powerRepository;
/**
* @var \Pterodactyl\Contracts\Repository\ServerRepositoryInterface
*/
private $repository;
/**
* @var \Illuminate\Validation\Factory
*/
private $validator;
/**
* @var string
*/
@ -39,37 +24,18 @@ class BulkPowerActionCommand extends Command
*/
protected $description = 'Perform bulk power management on large groupings of servers or nodes at once.';
/**
* BulkPowerActionCommand constructor.
*
* @param \Pterodactyl\Repositories\Wings\DaemonPowerRepository $powerRepository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Illuminate\Validation\Factory $validator
*/
public function __construct(
DaemonPowerRepository $powerRepository,
ServerRepositoryInterface $repository,
ValidatorFactory $validator
) {
parent::__construct();
$this->repository = $repository;
$this->validator = $validator;
$this->powerRepository = $powerRepository;
}
/**
* Handle the bulk power request.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function handle()
public function handle(DaemonPowerRepository $powerRepository, ValidatorFactory $validator)
{
$action = $this->argument('action');
$nodes = empty($this->option('nodes')) ? [] : explode(',', $this->option('nodes'));
$servers = empty($this->option('servers')) ? [] : explode(',', $this->option('servers'));
$validator = $this->validator->make([
$validator = $validator->make([
'action' => $action,
'nodes' => $nodes,
'servers' => $servers,
@ -89,23 +55,18 @@ class BulkPowerActionCommand extends Command
throw new ValidationException($validator);
}
$count = $this->repository->getServersForPowerActionCount($servers, $nodes);
if (! $this->confirm(trans('command/messages.server.power.confirm', ['action' => $action, 'count' => $count])) && $this->input->isInteractive()) {
$count = $this->getQueryBuilder($servers, $nodes)->count();
if (!$this->confirm(trans('command/messages.server.power.confirm', ['action' => $action, 'count' => $count])) && $this->input->isInteractive()) {
return;
}
$bar = $this->output->createProgressBar($count);
$servers = $this->repository->getServersForPowerAction($servers, $nodes);
$servers->each(function ($server) use ($action, &$bar) {
$this->getQueryBuilder($servers, $nodes)->each(function (Server $server) use ($action, $powerRepository, &$bar) {
$bar->clear();
try {
$this->powerRepository
->setNode($server->node)
->setServer($server)
->send($action);
} catch (RequestException $exception) {
$powerRepository->setServer($server)->send($action);
} catch (DaemonConnectionException $exception) {
$this->output->error(trans('command/messages.server.power.action_failed', [
'name' => $server->name,
'id' => $server->id,
@ -120,4 +81,24 @@ class BulkPowerActionCommand extends Command
$this->line('');
}
/**
* Returns the query builder instance that will return the servers that should be affected.
*
* @return \Illuminate\Database\Eloquent\Builder
*/
protected function getQueryBuilder(array $servers, array $nodes)
{
$instance = Server::query()->whereNull('status');
if (!empty($nodes) && !empty($servers)) {
$instance->whereIn('id', $servers)->orWhereIn('node_id', $nodes);
} elseif (empty($nodes) && !empty($servers)) {
$instance->whereIn('id', $servers);
} elseif (!empty($nodes) && empty($servers)) {
$instance->whereIn('node_id', $nodes);
}
return $instance->with('node');
}
}

View File

@ -1,113 +0,0 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Console\Commands\Server;
use Webmozart\Assert\Assert;
use Illuminate\Console\Command;
use GuzzleHttp\Exception\RequestException;
use Pterodactyl\Repositories\Eloquent\ServerRepository;
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
use Pterodactyl\Services\Servers\ServerConfigurationStructureService;
class BulkReinstallActionCommand extends Command
{
/**
* @var \Pterodactyl\Services\Servers\ServerConfigurationStructureService
*/
private $configurationStructureService;
/**
* @var \Pterodactyl\Repositories\Wings\DaemonServerRepository
*/
private $daemonRepository;
/**
* @var \Pterodactyl\Repositories\Eloquent\ServerRepository
*/
private $repository;
/**
* @var string
*/
protected $description = 'Reinstall a single server, all servers on a node, or all servers on the panel.';
/**
* @var string
*/
protected $signature = 'p:server:reinstall
{server? : The ID of the server to reinstall.}
{--node= : ID of the node to reinstall all servers on. Ignored if server is passed.}';
/**
* BulkReinstallActionCommand constructor.
*
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
* @param \Pterodactyl\Repositories\Eloquent\ServerRepository $repository
*/
public function __construct(
DaemonServerRepository $daemonRepository,
ServerConfigurationStructureService $configurationStructureService,
ServerRepository $repository
) {
parent::__construct();
$this->configurationStructureService = $configurationStructureService;
$this->daemonRepository = $daemonRepository;
$this->repository = $repository;
}
/**
* Handle command execution.
*/
public function handle()
{
$servers = $this->getServersToProcess();
if (! $this->confirm(trans('command/messages.server.reinstall.confirm')) && $this->input->isInteractive()) {
return;
}
$bar = $this->output->createProgressBar(count($servers));
$servers->each(function ($server) use ($bar) {
$bar->clear();
try {
$this->daemonRepository->setServer($server)->reinstall();
} catch (RequestException $exception) {
$this->output->error(trans('command/messages.server.reinstall.failed', [
'name' => $server->name,
'id' => $server->id,
'node' => $server->node->name,
'message' => $exception->getMessage(),
]));
}
$bar->advance();
$bar->display();
});
$this->line('');
}
/**
* Return the servers to be reinstalled.
*
* @return \Illuminate\Support\Collection
*/
private function getServersToProcess()
{
Assert::nullOrIntegerish($this->argument('server'), 'Value passed in server argument must be null or an integer, received %s.');
Assert::nullOrIntegerish($this->option('node'), 'Value passed in node option must be null or integer, received %s.');
return $this->repository->getDataForReinstall($this->argument('server'), $this->option('node'));
}
}

View File

@ -0,0 +1,197 @@
<?php
namespace Pterodactyl\Console\Commands;
use Closure;
use Illuminate\Console\Command;
use Pterodactyl\Console\Kernel;
use Symfony\Component\Process\Process;
use Symfony\Component\Console\Helper\ProgressBar;
class UpgradeCommand extends Command
{
protected const DEFAULT_URL = 'https://github.com/pterodactyl/panel/releases/%s/panel.tar.gz';
/** @var string */
protected $signature = 'p:upgrade
{--user= : The user that PHP runs under. All files will be owned by this user.}
{--group= : The group that PHP runs under. All files will be owned by this group.}
{--url= : The specific archive to download.}
{--release= : A specific Pterodactyl version to download from GitHub. Leave blank to use latest.}
{--skip-download : If set no archive will be downloaded.}';
/** @var string */
protected $description = 'Downloads a new archive for Pterodactyl from GitHub and then executes the normal upgrade commands.';
/**
* Executes an upgrade command which will run through all of our standard
* commands for Pterodactyl and enable users to basically just download
* the archive and execute this and be done.
*
* This places the application in maintenance mode as well while the commands
* are being executed.
*
* @throws \Exception
*/
public function handle()
{
$skipDownload = $this->option('skip-download');
if (!$skipDownload) {
$this->output->warning('This command does not verify the integrity of downloaded assets. Please ensure that you trust the download source before continuing. If you do not wish to download an archive, please indicate that using the --skip-download flag, or answering "no" to the question below.');
$this->output->comment('Download Source (set with --url=):');
$this->line($this->getUrl());
}
if (version_compare(PHP_VERSION, '7.4.0') < 0) {
$this->error('Cannot execute self-upgrade process. The minimum required PHP version required is 7.4.0, you have [' . PHP_VERSION . '].');
}
$user = 'www-data';
$group = 'www-data';
if ($this->input->isInteractive()) {
if (!$skipDownload) {
$skipDownload = !$this->confirm('Would you like to download and unpack the archive files for the latest version?', true);
}
if (is_null($this->option('user'))) {
$userDetails = posix_getpwuid(fileowner('public'));
$user = $userDetails['name'] ?? 'www-data';
if (!$this->confirm("Your webserver user has been detected as <fg=blue>[{$user}]:</> is this correct?", true)) {
$user = $this->anticipate(
'Please enter the name of the user running your webserver process. This varies from system to system, but is generally "www-data", "nginx", or "apache".',
[
'www-data',
'nginx',
'apache',
]
);
}
}
if (is_null($this->option('group'))) {
$groupDetails = posix_getgrgid(filegroup('public'));
$group = $groupDetails['name'] ?? 'www-data';
if (!$this->confirm("Your webserver group has been detected as <fg=blue>[{$group}]:</> is this correct?", true)) {
$group = $this->anticipate(
'Please enter the name of the group running your webserver process. Normally this is the same as your user.',
[
'www-data',
'nginx',
'apache',
]
);
}
}
if (!$this->confirm('Are you sure you want to run the upgrade process for your Panel?')) {
$this->warn('Upgrade process terminated by user.');
return;
}
}
ini_set('output_buffering', 0);
$bar = $this->output->createProgressBar($skipDownload ? 9 : 10);
$bar->start();
if (!$skipDownload) {
$this->withProgress($bar, function () {
$this->line("\$upgrader> curl -L \"{$this->getUrl()}\" | tar -xzv");
$process = Process::fromShellCommandline("curl -L \"{$this->getUrl()}\" | tar -xzv");
$process->run(function ($type, $buffer) {
$this->{$type === Process::ERR ? 'error' : 'line'}($buffer);
});
});
}
$this->withProgress($bar, function () {
$this->line('$upgrader> php artisan down');
$this->call('down');
});
$this->withProgress($bar, function () {
$this->line('$upgrader> chmod -R 755 storage bootstrap/cache');
$process = new Process(['chmod', '-R', '755', 'storage', 'bootstrap/cache']);
$process->run(function ($type, $buffer) {
$this->{$type === Process::ERR ? 'error' : 'line'}($buffer);
});
});
$this->withProgress($bar, function () {
$command = ['composer', 'install', '--no-ansi'];
if (config('app.env') === 'production' && !config('app.debug')) {
$command[] = '--optimize-autoloader';
$command[] = '--no-dev';
}
$this->line('$upgrader> ' . implode(' ', $command));
$process = new Process($command);
$process->setTimeout(10 * 60);
$process->run(function ($type, $buffer) {
$this->line($buffer);
});
});
/** @var \Illuminate\Foundation\Application $app */
$app = require __DIR__ . '/../../../bootstrap/app.php';
/** @var \Pterodactyl\Console\Kernel $kernel */
$kernel = $app->make(Kernel::class);
$kernel->bootstrap();
$this->setLaravel($app);
$this->withProgress($bar, function () {
$this->line('$upgrader> php artisan view:clear');
$this->call('view:clear');
});
$this->withProgress($bar, function () {
$this->line('$upgrader> php artisan config:clear');
$this->call('config:clear');
});
$this->withProgress($bar, function () {
$this->line('$upgrader> php artisan migrate --force --seed');
$this->call('migrate', ['--force' => true, '--seed' => true]);
});
$this->withProgress($bar, function () use ($user, $group) {
$this->line("\$upgrader> chown -R {$user}:{$group} *");
$process = Process::fromShellCommandline("chown -R {$user}:{$group} *", $this->getLaravel()->basePath());
$process->setTimeout(10 * 60);
$process->run(function ($type, $buffer) {
$this->{$type === Process::ERR ? 'error' : 'line'}($buffer);
});
});
$this->withProgress($bar, function () {
$this->line('$upgrader> php artisan queue:restart');
$this->call('queue:restart');
});
$this->withProgress($bar, function () {
$this->line('$upgrader> php artisan up');
$this->call('up');
});
$this->newLine(2);
$this->info('Panel has been successfully upgraded. Please ensure you also update any Wings instances: https://pterodactyl.io/wings/1.0/upgrading.html');
}
protected function withProgress(ProgressBar $bar, Closure $callback)
{
$bar->clear();
$callback();
$bar->advance();
$bar->display();
}
protected function getUrl(): string
{
if ($this->option('url')) {
return $this->option('url');
}
return sprintf(self::DEFAULT_URL, $this->option('release') ? 'download/v' . $this->option('release') : 'latest/download');
}
}

View File

@ -9,11 +9,10 @@
namespace Pterodactyl\Console\Commands\User;
use Webmozart\Assert\Assert;
use Pterodactyl\Models\User;
use Webmozart\Assert\Assert;
use Illuminate\Console\Command;
use Pterodactyl\Services\Users\UserDeletionService;
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
class DeleteUserCommand extends Command
{
@ -39,10 +38,9 @@ class DeleteUserCommand extends Command
/**
* DeleteUserCommand constructor.
*
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
*/
public function __construct(UserDeletionService $deletionService) {
public function __construct(UserDeletionService $deletionService)
{
parent::__construct();
$this->deletionService = $deletionService;
@ -50,6 +48,7 @@ class DeleteUserCommand extends Command
/**
* @return bool
*
* @throws \Pterodactyl\Exceptions\DisplayException
*/
public function handle()
@ -58,8 +57,9 @@ class DeleteUserCommand extends Command
Assert::notEmpty($search, 'Search term should be an email address, got: %s.');
$results = User::query()
->where('email', 'LIKE', "$search%")
->where('username', 'LIKE', "$search%")
->where('id', 'LIKE', "$search%")
->orWhere('username', 'LIKE', "$search%")
->orWhere('email', 'LIKE', "$search%")
->get();
if (count($results) < 1) {
@ -78,7 +78,7 @@ class DeleteUserCommand extends Command
}
$this->table(['User ID', 'Email', 'Name'], $tableValues);
if (! $deleteUser = $this->ask(trans('command/messages.user.select_search_user'))) {
if (!$deleteUser = $this->ask(trans('command/messages.user.select_search_user'))) {
return $this->handle();
}
} else {
@ -91,11 +91,9 @@ class DeleteUserCommand extends Command
$deleteUser = $results->first();
}
if ($this->confirm(trans('command/messages.user.confirm_delete')) || ! $this->input->isInteractive()) {
if ($this->confirm(trans('command/messages.user.confirm_delete')) || !$this->input->isInteractive()) {
$this->deletionService->handle($deleteUser);
$this->info(trans('command/messages.user.deleted'));
}
return;
}
}

View File

@ -31,8 +31,6 @@ class DisableTwoFactorCommand extends Command
/**
* DisableTwoFactorCommand constructor.
*
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $repository
*/
public function __construct(UserRepositoryInterface $repository)
{

View File

@ -31,8 +31,6 @@ class MakeUserCommand extends Command
/**
* MakeUserCommand constructor.
*
* @param \Pterodactyl\Services\Users\UserCreationService $creationService
*/
public function __construct(UserCreationService $creationService)
{
@ -55,7 +53,7 @@ class MakeUserCommand extends Command
$name_first = $this->option('name-first') ?? $this->ask(trans('command/messages.user.ask_name_first'));
$name_last = $this->option('name-last') ?? $this->ask(trans('command/messages.user.ask_name_last'));
if (is_null($password = $this->option('password')) && ! $this->option('no-password')) {
if (is_null($password = $this->option('password')) && !$this->option('no-password')) {
$this->warn(trans('command/messages.user.ask_password_help'));
$this->line(trans('command/messages.user.ask_password_tip'));
$password = $this->secret(trans('command/messages.user.ask_password'));

View File

@ -17,19 +17,16 @@ class Kernel extends ConsoleKernel
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
*/
protected function schedule(Schedule $schedule)
{
// Execute scheduled commands for servers every minute, as if there was a normal cron running.
$schedule->command('p:schedule:process')->everyMinute()->withoutOverlapping();
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be removed
// from the UI view for the server.
$schedule->command('p:maintenance:prune-backups', [
'--since-minutes' => '30',
])->everyThirtyMinutes();
if (config('backups.prune_age')) {
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be deleted.
$schedule->command('p:maintenance:prune-backups')->everyThirtyMinutes();
}
// Every day cleanup any internal backups of service files.
$schedule->command('p:maintenance:clean-service-backups')->daily();

View File

@ -0,0 +1,55 @@
<?php
namespace Pterodactyl\Console;
/**
* @mixin \Illuminate\Console\Command
*/
trait RequiresDatabaseMigrations
{
/**
* Checks if the migrations have finished running by comparing the last migration file.
*/
protected function hasCompletedMigrations(): bool
{
/** @var \Illuminate\Database\Migrations\Migrator $migrator */
$migrator = $this->getLaravel()->make('migrator');
$files = $migrator->getMigrationFiles(database_path('migrations'));
if (!$migrator->repositoryExists()) {
return false;
}
if (array_diff(array_keys($files), $migrator->getRepository()->getRan())) {
return false;
}
return true;
}
/**
* Throw a massive error into the console to hopefully catch the users attention and get
* them to properly run the migrations rather than ignoring all of the other previous
* errors...
*/
protected function showMigrationWarning()
{
$this->getOutput()->writeln('<options=bold>
| @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| |
| Your database has not been properly migrated! |
| |
| @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |</>
You must run the following command to finish migrating your database:
<fg=green;options=bold>php artisan migrate --step --force</>
You will not be able to use Pterodactyl Panel as expected without fixing your
database state by running the command above.
');
$this->getOutput()->error('You must correct the error above before continuing.');
}
}

View File

@ -8,8 +8,6 @@ interface ReceivesEvents
{
/**
* Handles receiving an event from the application.
*
* @param \Pterodactyl\Events\Event $notification
*/
public function handle(Event $notification): void;
}

View File

@ -17,7 +17,7 @@ interface CriteriaInterface
* Apply selected criteria to a repository call.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param \Pterodactyl\Repositories\Repository $repository
*
* @return mixed
*/
public function apply($model, Repository $repository);

View File

@ -18,6 +18,7 @@ interface HashidsInterface extends VendorHashidsInterface
*
* @param string $encoded
* @param null $default
*
* @return mixed
*
* @throws \InvalidArgumentException

View File

@ -8,8 +8,6 @@ interface ClientPermissionsRequest
* Returns the permissions string indicating which permission should be used to
* validate that the authenticated user has permission to perform this action aganist
* the given resource (server).
*
* @return string
*/
public function permission(): string;
}

View File

@ -2,25 +2,17 @@
namespace Pterodactyl\Contracts\Repository;
use Illuminate\Support\Collection;
interface AllocationRepositoryInterface extends RepositoryInterface
{
/**
* Return all of the allocations that exist for a node that are not currently
* allocated.
*
* @param int $node
* @return array
*/
public function getUnassignedAllocationIds(int $node): array;
/**
* Return a single allocation from those meeting the requirements.
*
* @param array $nodes
* @param array $ports
* @param bool $dedicated
* @return \Pterodactyl\Models\Allocation|null
*/
public function getRandomAllocation(array $nodes, array $ports, bool $dedicated = false);

View File

@ -9,35 +9,21 @@ interface ApiKeyRepositoryInterface extends RepositoryInterface
{
/**
* Get all of the account API keys that exist for a specific user.
*
* @param \Pterodactyl\Models\User $user
* @return \Illuminate\Support\Collection
*/
public function getAccountKeys(User $user): Collection;
/**
* Get all of the application API keys that exist for a specific user.
*
* @param \Pterodactyl\Models\User $user
* @return \Illuminate\Support\Collection
*/
public function getApplicationKeys(User $user): Collection;
/**
* Delete an account API key from the panel for a specific user.
*
* @param \Pterodactyl\Models\User $user
* @param string $identifier
* @return int
*/
public function deleteAccountKey(User $user, string $identifier): int;
/**
* Delete an application API key from the panel for a specific user.
*
* @param \Pterodactyl\Models\User $user
* @param string $identifier
* @return int
*/
public function deleteApplicationKey(User $user, string $identifier): int;
}

View File

@ -9,8 +9,6 @@ interface DatabaseHostRepositoryInterface extends RepositoryInterface
/**
* Return database hosts with a count of databases and the node
* information for which it is attached.
*
* @return \Illuminate\Support\Collection
*/
public function getWithViewDetails(): Collection;
}

View File

@ -8,101 +8,60 @@ use Illuminate\Contracts\Pagination\LengthAwarePaginator;
interface DatabaseRepositoryInterface extends RepositoryInterface
{
const DEFAULT_CONNECTION_NAME = 'dynamic';
public const DEFAULT_CONNECTION_NAME = 'dynamic';
/**
* Set the connection name to execute statements against.
*
* @param string $connection
* @return $this
*/
public function setConnection(string $connection);
/**
* Return the connection to execute statements against.
*
* @return string
*/
public function getConnection(): string;
/**
* Return all of the databases belonging to a server.
*
* @param int $server
* @return \Illuminate\Support\Collection
*/
public function getDatabasesForServer(int $server): Collection;
/**
* Return all of the databases for a given host with the server relationship loaded.
*
* @param int $host
* @param int $count
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function getDatabasesForHost(int $host, int $count = 25): LengthAwarePaginator;
/**
* Create a new database if it does not already exist on the host with
* the provided details.
*
* @param array $data
* @return \Pterodactyl\Models\Database
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\DuplicateDatabaseNameException
*/
public function createIfNotExists(array $data): Database;
/**
* Create a new database on a given connection.
*
* @param string $database
* @return bool
*/
public function createDatabase(string $database): bool;
/**
* Create a new database user on a given connection.
*
* @param string $username
* @param string $remote
* @param string $password
* @param $max_connections
* @return bool
*/
public function createUser(string $username, string $remote, string $password, string $max_connections): bool;
/**
* Give a specific user access to a given database.
*
* @param string $database
* @param string $username
* @param string $remote
* @return bool
*/
public function assignUserToDatabase(string $database, string $username, string $remote): bool;
/**
* Flush the privileges for a given connection.
*
* @return bool
*/
public function flush(): bool;
/**
* Drop a given database on a specific connection.
*
* @param string $database
* @return bool
*/
public function dropDatabase(string $database): bool;
/**
* Drop a given user on a specific connection.
*
* @param string $username
* @param string $remote
* @return mixed
*/
public function dropUser(string $username, string $remote): bool;

View File

@ -17,17 +17,12 @@ interface EggRepositoryInterface extends RepositoryInterface
/**
* Return an egg with the variables relation attached.
*
* @param int $id
* @return \Pterodactyl\Models\Egg
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithVariables(int $id): Egg;
/**
* Return all eggs and their relations to be used in the daemon API.
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function getAllWithCopyAttributes(): Collection;
@ -35,27 +30,18 @@ interface EggRepositoryInterface extends RepositoryInterface
* Return an egg with the scriptFrom and configFrom relations loaded onto the model.
*
* @param int|string $value
* @param string $column
* @return \Pterodactyl\Models\Egg
*/
public function getWithCopyAttributes($value, string $column = 'id'): Egg;
/**
* Return all of the data needed to export a service.
*
* @param int $id
* @return \Pterodactyl\Models\Egg
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithExportAttributes(int $id): Egg;
/**
* Confirm a copy script belongs to the same nest as the item trying to use it.
*
* @param int $copyFromId
* @param int $service
* @return bool
*/
public function isCopyableScript(int $copyFromId, int $service): bool;
}

View File

@ -16,9 +16,6 @@ interface EggVariableRepositoryInterface extends RepositoryInterface
/**
* Return editable variables for a given egg. Editable variables must be set to
* user viewable in order to be picked up by this function.
*
* @param int $egg
* @return \Illuminate\Support\Collection
*/
public function getEditableVariables(int $egg): Collection;
}

View File

@ -9,22 +9,17 @@ interface LocationRepositoryInterface extends RepositoryInterface
{
/**
* Return locations with a count of nodes and servers attached to it.
*
* @return \Illuminate\Support\Collection
*/
public function getAllWithDetails(): Collection;
/**
* Return all of the available locations with the nodes as a relationship.
*
* @return \Illuminate\Support\Collection
*/
public function getAllWithNodes(): Collection;
/**
* Return all of the nodes and their respective count of servers for a location.
*
* @param int $id
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
@ -34,7 +29,6 @@ interface LocationRepositoryInterface extends RepositoryInterface
/**
* Return a location and the count of nodes in that location.
*
* @param int $id
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View File

@ -17,6 +17,7 @@ interface NestRepositoryInterface extends RepositoryInterface
* Return a nest or all nests with their associated eggs and variables.
*
* @param int $id
*
* @return \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Nest
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
@ -26,7 +27,6 @@ interface NestRepositoryInterface extends RepositoryInterface
/**
* Return a nest or all nests and the count of eggs and servers for that nest.
*
* @param int|null $id
* @return \Pterodactyl\Models\Nest|\Illuminate\Database\Eloquent\Collection
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
@ -36,9 +36,6 @@ interface NestRepositoryInterface extends RepositoryInterface
/**
* Return a nest along with its associated eggs and the servers relation on those eggs.
*
* @param int $id
* @return \Pterodactyl\Models\Nest
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithEggServers(int $id): Nest;

View File

@ -4,65 +4,35 @@ namespace Pterodactyl\Contracts\Repository;
use Pterodactyl\Models\Node;
use Illuminate\Support\Collection;
use Illuminate\Support\LazyCollection;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Pterodactyl\Contracts\Repository\Attributes\SearchableInterface;
interface NodeRepositoryInterface extends RepositoryInterface
{
const THRESHOLD_PERCENTAGE_LOW = 75;
const THRESHOLD_PERCENTAGE_MEDIUM = 90;
public const THRESHOLD_PERCENTAGE_LOW = 75;
public const THRESHOLD_PERCENTAGE_MEDIUM = 90;
/**
* Return the usage stats for a single node.
*
* @param \Pterodactyl\Models\Node $node
* @return array
*/
public function getUsageStats(Node $node): array;
/**
* Return the usage stats for a single node.
*
* @param \Pterodactyl\Models\Node $node
* @return array
*/
public function getUsageStatsRaw(Node $node): array;
/**
* Return a single node with location and server information.
*
* @param \Pterodactyl\Models\Node $node
* @param bool $refresh
* @return \Pterodactyl\Models\Node
*/
public function loadLocationAndServerCount(Node $node, bool $refresh = false): Node;
/**
* Attach a paginated set of allocations to a node mode including
* any servers that are also attached to those allocations.
*
* @param \Pterodactyl\Models\Node $node
* @param bool $refresh
* @return \Pterodactyl\Models\Node
*/
public function loadNodeAllocations(Node $node, bool $refresh = false): Node;
/**
* Return a collection of nodes for all locations to use in server creation UI.
*
* @return \Illuminate\Support\Collection
*/
public function getNodesForServerCreation(): Collection;
/**
* Return the IDs of all nodes that exist in the provided locations and have the space
* available to support the additional disk and memory provided.
*
* @param array $locations
* @param int $disk
* @param int $memory
* @return \Illuminate\Support\LazyCollection
*/
public function getNodesWithResourceUse(array $locations, int $disk, int $memory): LazyCollection;
}

View File

@ -39,6 +39,7 @@ interface RepositoryInterface
* An array of columns to filter the response by.
*
* @param array|string $columns
*
* @return $this
*/
public function setColumns($columns = ['*']);
@ -62,7 +63,6 @@ interface RepositoryInterface
* Set whether or not the repository should return a fresh model
* when changes are committed.
*
* @param bool $fresh
* @return $this
*/
public function setFreshModel(bool $fresh = true);
@ -70,9 +70,6 @@ interface RepositoryInterface
/**
* Create a new model instance and persist it to the database.
*
* @param array $fields
* @param bool $validate
* @param bool $force
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -82,7 +79,6 @@ interface RepositoryInterface
/**
* Find a model that has the specific ID passed.
*
* @param int $id
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
@ -91,16 +87,12 @@ interface RepositoryInterface
/**
* Find a model matching an array of where clauses.
*
* @param array $fields
* @return \Illuminate\Support\Collection
*/
public function findWhere(array $fields): Collection;
/**
* Find and return the first matching instance for the given fields.
*
* @param array $fields
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
@ -109,25 +101,16 @@ interface RepositoryInterface
/**
* Return a count of records matching the passed arguments.
*
* @param array $fields
* @return int
*/
public function findCountWhere(array $fields): int;
/**
* Delete a given record from the database.
*
* @param int $id
* @return int
*/
public function delete(int $id): int;
/**
* Delete records matching the given attributes.
*
* @param array $attributes
* @return int
*/
public function deleteWhere(array $attributes): int;
@ -135,9 +118,7 @@ interface RepositoryInterface
* Update a given ID with the passed array of fields.
*
* @param int $id
* @param array $fields
* @param bool $validate
* @param bool $force
*
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -148,21 +129,12 @@ interface RepositoryInterface
/**
* Perform a mass update where matching records are updated using whereIn.
* This does not perform any model data validation.
*
* @param string $column
* @param array $values
* @param array $fields
* @return int
*/
public function updateWhereIn(string $column, array $values, array $fields): int;
/**
* Update a record if it exists in the database, otherwise create it.
*
* @param array $where
* @param array $fields
* @param bool $validate
* @param bool $force
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -171,40 +143,27 @@ interface RepositoryInterface
/**
* Return all records associated with the given model.
*
* @return Collection
*/
public function all(): Collection;
/**
* Return a paginated result set using a search term if set on the repository.
*
* @param int $perPage
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function paginated(int $perPage): LengthAwarePaginator;
/**
* Insert a single or multiple records into the database at once skipping
* validation and mass assignment checking.
*
* @param array $data
* @return bool
*/
public function insert(array $data): bool;
/**
* Insert multiple records into the database and ignore duplicates.
*
* @param array $values
* @return bool
*/
public function insertIgnore(array $values): bool;
/**
* Get the amount of entries in the database.
*
* @return int
*/
public function count(): int;
}

View File

@ -9,37 +9,13 @@ interface ScheduleRepositoryInterface extends RepositoryInterface
{
/**
* Return all of the schedules for a given server.
*
* @param int $server
* @return \Illuminate\Support\Collection
*/
public function findServerSchedules(int $server): Collection;
/**
* Load the tasks relationship onto the Schedule module if they are not
* already present.
*
* @param \Pterodactyl\Models\Schedule $schedule
* @param bool $refresh
* @return \Pterodactyl\Models\Schedule
*/
public function loadTasks(Schedule $schedule, bool $refresh = false): Schedule;
/**
* Return a schedule model with all of the associated tasks as a relationship.
*
* @param int $schedule
* @return \Pterodactyl\Models\Schedule
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getScheduleWithTasks(int $schedule): Schedule;
/**
* Return all of the schedules that should be processed.
*
* @param string $timestamp
* @return \Illuminate\Support\Collection
*/
public function getSchedulesToProcess(string $timestamp): Collection;
}

View File

@ -10,37 +10,22 @@ interface ServerRepositoryInterface extends RepositoryInterface
{
/**
* Load the egg relations onto the server model.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*/
public function loadEggRelations(Server $server, bool $refresh = false): Server;
/**
* Return a collection of servers with their associated data for rebuild operations.
*
* @param int|null $server
* @param int|null $node
* @return \Illuminate\Support\Collection
*/
public function getDataForRebuild(int $server = null, int $node = null): Collection;
/**
* Return a collection of servers with their associated data for reinstall operations.
*
* @param int|null $server
* @param int|null $node
* @return \Illuminate\Support\Collection
*/
public function getDataForReinstall(int $server = null, int $node = null): Collection;
/**
* Return a server model and all variables associated with the server.
*
* @param int $id
* @return \Pterodactyl\Models\Server
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function findWithVariables(int $id): Server;
@ -49,28 +34,16 @@ interface ServerRepositoryInterface extends RepositoryInterface
* Get the primary allocation for a given server. If a model is passed into
* the function, load the allocation relationship onto it. Otherwise, find and
* return the server from the database.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*/
public function getPrimaryAllocation(Server $server, bool $refresh = false): Server;
/**
* Return enough data to be used for the creation of a server via the daemon.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*/
public function getDataForCreation(Server $server, bool $refresh = false): Server;
/**
* Load associated databases onto the server model.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*/
public function loadDatabaseRelations(Server $server, bool $refresh = false): Server;
@ -78,77 +51,23 @@ interface ServerRepositoryInterface extends RepositoryInterface
* Get data for use when updating a server on the Daemon. Returns an array of
* the egg which is used for build and rebuild. Only loads relations
* if they are missing, or refresh is set to true.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @return array
*/
public function getDaemonServiceData(Server $server, bool $refresh = false): array;
/**
* Return a server by UUID.
*
* @param string $uuid
* @return \Pterodactyl\Models\Server
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getByUuid(string $uuid): Server;
/**
* Return all of the servers that should have a power action performed against them.
*
* @param int[] $servers
* @param int[] $nodes
* @param bool $returnCount
* @return int|\Illuminate\Support\LazyCollection
*/
public function getServersForPowerAction(array $servers = [], array $nodes = [], bool $returnCount = false);
/**
* Return the total number of servers that will be affected by the query.
*
* @param int[] $servers
* @param int[] $nodes
* @return int
*/
public function getServersForPowerActionCount(array $servers = [], array $nodes = []): int;
/**
* Check if a given UUID and UUID-Short string are unique to a server.
*
* @param string $uuid
* @param string $short
* @return bool
*/
public function isUniqueUuidCombo(string $uuid, string $short): bool;
/**
* Get the amount of servers that are suspended.
*
* @return int
*/
public function getSuspendedServersCount(): int;
/**
* Returns all of the servers that exist for a given node in a paginated response.
*
* @param int $node
* @param int $limit
*
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function loadAllServersForNode(int $node, int $limit): LengthAwarePaginator;
/**
* Returns every server that exists for a given node.
*
* This is different from {@see loadAllServersForNode} because
* it does not paginate the response.
*
* @param int $node
*
* @return \Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection
*/
public function loadEveryServerForNode(int $node);
}

View File

@ -8,17 +8,12 @@ interface SessionRepositoryInterface extends RepositoryInterface
{
/**
* Return all of the active sessions for a user.
*
* @param int $user
* @return \Illuminate\Support\Collection
*/
public function getUserSessions(int $user): Collection;
/**
* Delete a session for a given user.
*
* @param int $user
* @param string $session
* @return int|null
*/
public function deleteUserSession(int $user, string $session);

View File

@ -7,9 +7,6 @@ interface SettingsRepositoryInterface extends RepositoryInterface
/**
* Store a new persistent setting in the database.
*
* @param string $key
* @param string|null $value
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
@ -18,16 +15,14 @@ interface SettingsRepositoryInterface extends RepositoryInterface
/**
* Retrieve a persistent setting from the database.
*
* @param string $key
* @param mixed $default
*
* @return mixed
*/
public function get(string $key, $default);
/**
* Remove a key from the database cache.
*
* @param string $key
*/
public function forget(string $key);
}

View File

@ -8,29 +8,17 @@ interface SubuserRepositoryInterface extends RepositoryInterface
{
/**
* Return a subuser with the associated server relationship.
*
* @param \Pterodactyl\Models\Subuser $subuser
* @param bool $refresh
* @return \Pterodactyl\Models\Subuser
*/
public function loadServerAndUserRelations(Subuser $subuser, bool $refresh = false): Subuser;
/**
* Return a subuser with the associated permissions relationship.
*
* @param \Pterodactyl\Models\Subuser $subuser
* @param bool $refresh
* @return \Pterodactyl\Models\Subuser
*/
public function getWithPermissions(Subuser $subuser, bool $refresh = false): Subuser;
/**
* Return a subuser and associated permissions given a user_id and server_id.
*
* @param int $user
* @param int $server
* @return \Pterodactyl\Models\Subuser
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithPermissionsUsingUserAndServer(int $user, int $server): Subuser;

View File

@ -9,9 +9,6 @@ interface TaskRepositoryInterface extends RepositoryInterface
/**
* Get a task and the server relationship for that task.
*
* @param int $id
* @return \Pterodactyl\Models\Task
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getTaskForJobProcess(int $id): Task;
@ -19,8 +16,6 @@ interface TaskRepositoryInterface extends RepositoryInterface
/**
* Returns the next task in a schedule.
*
* @param int $schedule
* @param int $index
* @return \Pterodactyl\Models\Task|null
*/
public function getNextTask(int $schedule, int $index);

View File

@ -25,8 +25,6 @@ class Created
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Server $server
*/
public function __construct(Server $server)
{

View File

@ -25,8 +25,6 @@ class Creating
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Server $server
*/
public function __construct(Server $server)
{

View File

@ -25,8 +25,6 @@ class Deleted
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Server $server
*/
public function __construct(Server $server)
{

View File

@ -25,8 +25,6 @@ class Deleting
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Server $server
*/
public function __construct(Server $server)
{

View File

@ -25,8 +25,6 @@ class Saved
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Server $server
*/
public function __construct(Server $server)
{

View File

@ -25,8 +25,6 @@ class Saving
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Server $server
*/
public function __construct(Server $server)
{

View File

@ -25,8 +25,6 @@ class Updated
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Server $server
*/
public function __construct(Server $server)
{

View File

@ -25,8 +25,6 @@ class Updating
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Server $server
*/
public function __construct(Server $server)
{

View File

@ -25,8 +25,6 @@ class Created
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Subuser $subuser
*/
public function __construct(Subuser $subuser)
{

View File

@ -25,8 +25,6 @@ class Creating
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Subuser $subuser
*/
public function __construct(Subuser $subuser)
{

View File

@ -25,8 +25,6 @@ class Deleted
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Subuser $subuser
*/
public function __construct(Subuser $subuser)
{

View File

@ -25,8 +25,6 @@ class Deleting
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\Subuser $subuser
*/
public function __construct(Subuser $subuser)
{

View File

@ -25,8 +25,6 @@ class Created
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\User $user
*/
public function __construct(User $user)
{

View File

@ -25,8 +25,6 @@ class Creating
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\User $user
*/
public function __construct(User $user)
{

View File

@ -25,8 +25,6 @@ class Deleted
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\User $user
*/
public function __construct(User $user)
{

View File

@ -25,8 +25,6 @@ class Deleting
/**
* Create a new event instance.
*
* @param \Pterodactyl\Models\User $user
*/
public function __construct(User $user)
{

View File

@ -11,10 +11,10 @@ use Prologue\Alerts\AlertsMessageBag;
class DisplayException extends PterodactylException
{
const LEVEL_DEBUG = 'debug';
const LEVEL_INFO = 'info';
const LEVEL_WARNING = 'warning';
const LEVEL_ERROR = 'error';
public const LEVEL_DEBUG = 'debug';
public const LEVEL_INFO = 'info';
public const LEVEL_WARNING = 'warning';
public const LEVEL_ERROR = 'error';
/**
* @var string
@ -25,7 +25,6 @@ class DisplayException extends PterodactylException
* Exception constructor.
*
* @param string $message
* @param Throwable|null $previous
* @param string $level
* @param int $code
*/
@ -58,6 +57,7 @@ class DisplayException extends PterodactylException
* request originated from an API hit, return the error in JSONAPI spec format.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
*/
public function render($request)
@ -83,7 +83,7 @@ class DisplayException extends PterodactylException
*/
public function report()
{
if (! $this->getPrevious() instanceof Exception || ! Handler::isReportable($this->getPrevious())) {
if (!$this->getPrevious() instanceof Exception || !Handler::isReportable($this->getPrevious())) {
return null;
}

View File

@ -5,10 +5,14 @@ namespace Pterodactyl\Exceptions;
use Exception;
use Throwable;
use PDOException;
use Psr\Log\LoggerInterface;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Swift_TransportException;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Collection;
use Illuminate\Container\Container;
use Illuminate\Database\Connection;
use Illuminate\Foundation\Application;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Validation\ValidationException;
@ -17,6 +21,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class Handler extends ExceptionHandler
{
@ -42,17 +47,6 @@ class Handler extends ExceptionHandler
ValidationException::class,
];
/**
* A list of exceptions that should be logged with cleaned stack
* traces to avoid exposing credentials or other sensitive information.
*
* @var array
*/
protected $cleanStacks = [
PDOException::class,
Swift_TransportException::class,
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
@ -66,56 +60,40 @@ class Handler extends ExceptionHandler
];
/**
* Report or log an exception. Skips Laravel's internal reporter since we
* don't need or want the user information in our logs by default.
* Registers the exception handling callbacks for the application. This
* will capture specific exception types that we do not want to include
* the detailed stack traces for since they could reveal credentials to
* whoever can read the logs.
*
* If you want to implement logging in a different format to integrate with
* services such as AWS Cloudwatch or other monitoring you can replace the
* contents of this function with a call to the parent reporter.
*
* @param \Throwable $exception
* @return mixed
*
* @throws \Throwable
* @noinspection PhpUnusedLocalVariableInspection
*/
public function report(Throwable $exception)
public function register()
{
if (! config('app.exceptions.report_all', false) && $this->shouldntReport($exception)) {
return null;
if (config('app.exceptions.report_all', false)) {
$this->dontReport = [];
}
if (method_exists($exception, 'report')) {
return $exception->report();
}
$this->reportable(function (PDOException $ex) {
$ex = $this->generateCleanedExceptionStack($ex);
});
try {
$logger = $this->container->make(LoggerInterface::class);
} catch (Exception $ex) {
throw $exception;
}
foreach ($this->cleanStacks as $class) {
if ($exception instanceof $class) {
$exception = $this->generateCleanedExceptionStack($exception);
break;
}
}
return $logger->error($exception);
$this->reportable(function (Swift_TransportException $ex) {
$ex = $this->generateCleanedExceptionStack($ex);
});
}
private function generateCleanedExceptionStack(Throwable $exception)
private function generateCleanedExceptionStack(Throwable $exception): string
{
$cleanedStack = '';
foreach ($exception->getTrace() as $index => $item) {
$cleanedStack .= sprintf(
"#%d %s(%d): %s%s%s\n",
$index,
array_get($item, 'file'),
array_get($item, 'line'),
array_get($item, 'class'),
array_get($item, 'type'),
array_get($item, 'function')
Arr::get($item, 'file'),
Arr::get($item, 'line'),
Arr::get($item, 'class'),
Arr::get($item, 'type'),
Arr::get($item, 'function')
);
}
@ -134,14 +112,14 @@ class Handler extends ExceptionHandler
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
*
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Throwable
*/
public function render($request, Throwable $exception)
{
$connections = Container::getInstance()->make(Connection::class);
$connections = $this->container->make(Connection::class);
// If we are currently wrapped up inside a transaction, we will roll all the way
// back to the beginning. This needs to happen, otherwise session data does not
@ -164,33 +142,34 @@ class Handler extends ExceptionHandler
* calls to the API.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Validation\ValidationException $exception
*
* @return \Illuminate\Http\JsonResponse
*/
public function invalidJson($request, ValidationException $exception)
{
$codes = collect($exception->validator->failed())->mapWithKeys(function ($reasons, $field) {
$codes = Collection::make($exception->validator->failed())->mapWithKeys(function ($reasons, $field) {
$cleaned = [];
foreach ($reasons as $reason => $attrs) {
$cleaned[] = snake_case($reason);
$cleaned[] = Str::snake($reason);
}
return [str_replace('.', '_', $field) => $cleaned];
})->toArray();
$errors = collect($exception->errors())->map(function ($errors, $field) use ($codes, $exception) {
$errors = Collection::make($exception->errors())->map(function ($errors, $field) use ($codes, $exception) {
$response = [];
foreach ($errors as $key => $error) {
$meta = [
'source_field' => $field,
'rule' => str_replace(self::PTERODACTYL_RULE_STRING, 'p_', array_get(
$codes, str_replace('.', '_', $field) . '.' . $key
'rule' => str_replace(self::PTERODACTYL_RULE_STRING, 'p_', Arr::get(
$codes,
str_replace('.', '_', $field) . '.' . $key
)),
];
$converted = self::convertToArray($exception)['errors'][0];
$converted['detail'] = $error;
$converted['meta'] = is_array($converted['meta']) ? array_merge($converted['meta'], $meta) : $meta;
$converted['meta'] = is_array($converted['meta'] ?? null) ? array_merge($converted['meta'], $meta) : $meta;
$response[] = $converted;
}
@ -205,10 +184,6 @@ class Handler extends ExceptionHandler
/**
* Return the exception as a JSONAPI representation for use on API requests.
*
* @param \Throwable $exception
* @param array $override
* @return array
*/
public static function convertToArray(Throwable $exception, array $override = []): array
{
@ -217,7 +192,9 @@ class Handler extends ExceptionHandler
'status' => method_exists($exception, 'getStatusCode')
? strval($exception->getStatusCode())
: ($exception instanceof ValidationException ? '422' : '500'),
'detail' => 'An error was encountered while processing this request.',
'detail' => $exception instanceof HttpExceptionInterface
? $exception->getMessage()
: 'An unexpected error was encountered while processing this request, please try again.',
];
if ($exception instanceof ModelNotFoundException || $exception->getPrevious() instanceof ModelNotFoundException) {
@ -232,7 +209,7 @@ class Handler extends ExceptionHandler
'detail' => $exception->getMessage(),
'source' => [
'line' => $exception->getLine(),
'file' => str_replace(base_path(), '', $exception->getFile()),
'file' => str_replace(Application::getInstance()->basePath(), '', $exception->getFile()),
],
'meta' => [
'trace' => explode("\n", $exception->getTraceAsString()),
@ -245,9 +222,6 @@ class Handler extends ExceptionHandler
/**
* Return an array of exceptions that should not be reported.
*
* @param \Exception $exception
* @return bool
*/
public static function isReportable(Exception $exception): bool
{
@ -258,23 +232,22 @@ class Handler extends ExceptionHandler
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(self::convertToArray($exception), 401);
return new JsonResponse(self::convertToArray($exception), JsonResponse::HTTP_UNAUTHORIZED);
}
return redirect()->guest(route('auth.login'));
return $this->container->make('redirect')->guest('/auth/login');
}
/**
* Converts an exception into an array to render in the response. Overrides
* Laravel's built-in converter to output as a JSONAPI spec compliant object.
*
* @param \Throwable $exception
* @return array
*/
protected function convertExceptionToArray(Throwable $exception)

View File

@ -2,8 +2,8 @@
namespace Pterodactyl\Exceptions\Http\Connection;
use Illuminate\Support\Arr;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;
use GuzzleHttp\Exception\GuzzleException;
use Pterodactyl\Exceptions\DisplayException;
@ -18,32 +18,48 @@ class DaemonConnectionException extends DisplayException
private $statusCode = Response::HTTP_GATEWAY_TIMEOUT;
/**
* Throw a displayable exception caused by a daemon connection error.
* Every request to the Wings instance will return a unique X-Request-Id header
* which allows for all errors to be efficiently tied to a specific request that
* triggered them, and gives users a more direct method of informing hosts when
* something goes wrong.
*
* @param \GuzzleHttp\Exception\GuzzleException $previous
* @param bool $useStatusCode
* @var string|null
*/
private $requestId;
/**
* Throw a displayable exception caused by a daemon connection error.
*/
public function __construct(GuzzleException $previous, bool $useStatusCode = true)
{
/** @var \GuzzleHttp\Psr7\Response|null $response */
$response = method_exists($previous, 'getResponse') ? $previous->getResponse() : null;
$this->requestId = $response ? $response->getHeaderLine('X-Request-Id') : null;
if ($useStatusCode) {
$this->statusCode = is_null($response) ? $this->statusCode : $response->getStatusCode();
// There are rare conditions where wings encounters a panic condition and crashes the
// request being made after content has already been sent over the wire. In these cases
// you can end up with a "successful" response code that is actual an error.
//
// Handle those better here since we shouldn't ever end up in this exception state and
// be returning a 2XX level response.
if ($this->statusCode < 400) {
$this->statusCode = Response::HTTP_BAD_GATEWAY;
}
}
$message = trans('admin/server.exceptions.daemon_exception', [
'code' => is_null($response) ? 'E_CONN_REFUSED' : $response->getStatusCode(),
]);
if (is_null($response)) {
$message = 'Could not establish a connection to the machine running this server. Please try again.';
} else {
$message = sprintf('There was an error while communicating with the machine running this server. This error has been logged, please try again. (code: %s) (request_id: %s)', $response->getStatusCode(), $this->requestId ?? '<nil>');
}
// Attempt to pull the actual error message off the response and return that if it is not
// a 500 level error.
if ($this->statusCode < 500 && ! is_null($response)) {
$body = $response->getBody();
if (is_string($body) || (is_object($body) && method_exists($body, '__toString'))) {
$body = json_decode(is_string($body) ? $body : $body->__toString(), true);
$message = "[Wings Error]: " . Arr::get($body, 'error', $message);
}
if ($this->statusCode < 500 && !is_null($response)) {
$body = json_decode($response->getBody()->__toString(), true);
$message = sprintf('An error occurred on the remote host: %s. (request id: %s)', $body['error'] ?? $message, $this->requestId ?? '<nil>');
}
$level = $this->statusCode >= 500 && $this->statusCode !== 504
@ -53,6 +69,19 @@ class DaemonConnectionException extends DisplayException
parent::__construct($message, $previous, $level);
}
/**
* Override the default reporting method for DisplayException by just logging immediately
* here and including the specific X-Request-Id header that was returned by the call.
*
* @return void
*/
public function report()
{
Log::{$this->getErrorLevel()}($this->getPrevious(), [
'request_id' => $this->requestId,
]);
}
/**
* Return the HTTP status code for this exception.
*
@ -62,4 +91,12 @@ class DaemonConnectionException extends DisplayException
{
return $this->statusCode;
}
/**
* @return string|null
*/
public function getRequestId()
{
return $this->requestId;
}
}

View File

@ -9,9 +9,6 @@ class HttpForbiddenException extends HttpException
{
/**
* HttpForbiddenException constructor.
*
* @param string|null $message
* @param \Throwable|null $previous
*/
public function __construct(string $message = null, \Throwable $previous = null)
{

View File

@ -0,0 +1,30 @@
<?php
namespace Pterodactyl\Exceptions\Http\Server;
use Throwable;
use Pterodactyl\Models\Server;
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
class ServerStateConflictException extends ConflictHttpException
{
/**
* Exception thrown when the server is in an unsupported state for API access or
* certain operations within the codebase.
*/
public function __construct(Server $server, Throwable $previous = null)
{
$message = 'This server is currently in an unsupported state, please try again later.';
if ($server->isSuspended()) {
$message = 'This server is currently suspended and the functionality requested is unavailable.';
} elseif (!$server->isInstalled()) {
$message = 'This server has not yet completed its installation process, please try again later.';
} elseif ($server->status === Server::STATUS_RESTORING_BACKUP) {
$message = 'This server is currently restoring from a backup, please try again later.';
} elseif (!is_null($server->transfer)) {
$message = 'This server is currently being transferred to a new machine, please try again later.';
}
parent::__construct($message, $previous);
}
}

View File

@ -0,0 +1,19 @@
<?php
namespace Pterodactyl\Exceptions\Http;
use Throwable;
use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class TwoFactorAuthRequiredException extends HttpException implements HttpExceptionInterface
{
/**
* TwoFactorAuthRequiredException constructor.
*/
public function __construct(Throwable $previous = null)
{
parent::__construct(Response::HTTP_BAD_REQUEST, 'Two-factor authentication is required on this account in order to access this endpoint.', $previous);
}
}

View File

@ -18,8 +18,6 @@ class DataValidationException extends PterodactylException implements HttpExcept
/**
* DataValidationException constructor.
*
* @param \Illuminate\Contracts\Validation\Validator $validator
*/
public function __construct(Validator $validator)
{

View File

@ -0,0 +1,18 @@
<?php
namespace Pterodactyl\Exceptions\Service\Allocation;
use Pterodactyl\Exceptions\DisplayException;
class AutoAllocationNotEnabledException extends DisplayException
{
/**
* AutoAllocationNotEnabledException constructor.
*/
public function __construct()
{
parent::__construct(
'Server auto-allocation is not enabled for this instance.'
);
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace Pterodactyl\Exceptions\Service\Allocation;
use Pterodactyl\Exceptions\DisplayException;
class NoAutoAllocationSpaceAvailableException extends DisplayException
{
/**
* NoAutoAllocationSpaceAvailableException constructor.
*/
public function __construct()
{
parent::__construct(
'Cannot assign additional allocation: no more space available on node.'
);
}
}

Some files were not shown because too many files have changed in this diff Show More