Merge branch 'develop' into feature/vuejs-auth

This commit is contained in:
Dane Everitt 2018-05-26 12:17:14 -07:00
commit cf90f56777
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
188 changed files with 854 additions and 625 deletions

View file

@ -6,6 +6,7 @@ APP_TIMEZONE=America/New_York
APP_CLEAR_TASKLOG=720 APP_CLEAR_TASKLOG=720
APP_DELETE_MINUTES=10 APP_DELETE_MINUTES=10
APP_ENVIRONMENT_ONLY=true APP_ENVIRONMENT_ONLY=true
LOG_CHANNEL=daily
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=3306 DB_PORT=3306

View file

@ -6,10 +6,20 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
## v0.7.7 (Derelict Dermodactylus) ## v0.7.7 (Derelict Dermodactylus)
### Fixed ### Fixed
* Fixes an issue with the sidebar logo not working correctly in some browsers due to the CSS being assigned. * Fixes an issue with the sidebar logo not working correctly in some browsers due to the CSS being assigned.
* Fixes a bunch of typos through the code base.
* Fixes a bug when attempting to load the dropdown menu for server owner in some cases.
* Fixes an exception thrown when the database connection address was not filled out correctly while adding a database to a server.
* Fixes some mistakes in the German translation of the panel.
### Added ### Added
* Added a new client API endpoint for gathering the utilization stats for servers including disk, cpu, and memory. `GET /api/client/servers/<id>/utilization` * Added a new client API endpoint for gathering the utilization stats for servers including disk, cpu, and memory. `GET /api/client/servers/<id>/utilization`
* Added validation to variable validation rules to validate that the validation rules are valid because we heard you like validating your validation. * Added validation to variable validation rules to validate that the validation rules are valid because we heard you like validating your validation.
* Added German translations for many previously untranslated parts of the panel.
### Changed
* Updated core framework from Laravel 5.5 to Laravel 5.6.
* Improved support for Windows based environments.
* Spigot Egg now builds spigot for you rather than requiring a download location be specified.
## v0.7.6 (Derelict Dermodactylus) ## v0.7.6 (Derelict Dermodactylus)
### Fixed ### Fixed
@ -27,7 +37,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
### Changed ### Changed
* Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline. * Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline.
* Sessions handled through redis now use a seperate database (default `1`) to store session database to avoid logging users out when flushing the cache. * Sessions handled through redis now use a separate database (default `1`) to store session database to avoid logging users out when flushing the cache.
* File manager UI improved to be clearer with buttons and cleaner on mobile. * File manager UI improved to be clearer with buttons and cleaner on mobile.
* reCAPTCHA's secret key position swapped with website key in advanced panel settings to be consistent with Google's reCAPTCHA dashboard. * reCAPTCHA's secret key position swapped with website key in advanced panel settings to be consistent with Google's reCAPTCHA dashboard.
* Changed DisplayException to handle its own logging correctly and check if the previous exception is marked as one that should not be logged. * Changed DisplayException to handle its own logging correctly and check if the previous exception is marked as one that should not be logged.
@ -56,7 +66,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* Fixes a bug when reinstalling a server that would not mark the server as installing, resulting in some UI issues. * Fixes a bug when reinstalling a server that would not mark the server as installing, resulting in some UI issues.
* Handle 404 errors from missing models in the application API bindings correctly. * Handle 404 errors from missing models in the application API bindings correctly.
* Fix validation error returned when no environment variables are passed, even if there are no variables required. * Fix validation error returned when no environment variables are passed, even if there are no variables required.
* Fix improper permissions on `PATCH /api/servers/<id>/startup` endpoint which was preventing enditing any start variables. * Fix improper permissions on `PATCH /api/servers/<id>/startup` endpoint which was preventing editing any start variables.
* Should fix migration issues from 0.6 when there are more than API key in the database. * Should fix migration issues from 0.6 when there are more than API key in the database.
### Changed ### Changed
@ -94,7 +104,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
## v0.7.1 (Derelict Dermodactylus) ## v0.7.1 (Derelict Dermodactylus)
### Fixed ### Fixed
* Fixes an exception when no token is entered on the 2-Factor enable/disable page and the form is submitted. * Fixes an exception when no token is entered on the 2-Factor enable/disable page and the form is submitted.
* Fixes an exception when trying to perform actions aganist a User model due to a validator that could not be cast to a string correctly. * Fixes an exception when trying to perform actions against a User model due to a validator that could not be cast to a string correctly.
* Allow FQDNs in database host creation UI correctly. * Allow FQDNs in database host creation UI correctly.
* Fixes database naming scheme using `d###_` rather than `s###_` when creating server databases. * Fixes database naming scheme using `d###_` rather than `s###_` when creating server databases.
* Fix exception thrown when attempting to update an existing database host. * Fix exception thrown when attempting to update an existing database host.
@ -110,7 +120,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* `[rc.2]` — Fixes bad API behavior on `/user` routes. * `[rc.2]` — Fixes bad API behavior on `/user` routes.
* `[rc.2]` — Fixes Admin CP user editing resetting a password on users unintentionally. * `[rc.2]` — Fixes Admin CP user editing resetting a password on users unintentionally.
* `[rc.2]` — Fixes bug with server creation API endpoint that would fail to validate `allocation.default` correctly. * `[rc.2]` — Fixes bug with server creation API endpoint that would fail to validate `allocation.default` correctly.
* `[rc.2]` — Fix data integrity exception occuring due to invalid data being passed to server creation service on the API. * `[rc.2]` — Fix data integrity exception occurring due to invalid data being passed to server creation service on the API.
* `[rc.2]` — Fix data integrity exception that could occur when an email containing non-username characters was passed. * `[rc.2]` — Fix data integrity exception that could occur when an email containing non-username characters was passed.
* `[rc.2]` — Fix data integrity exception occurring when no default value is provided for an egg variable. * `[rc.2]` — Fix data integrity exception occurring when no default value is provided for an egg variable.
* `[rc.2]` — Fixes a bug that would cause non-editable variables on the front-end to throw a validation error. * `[rc.2]` — Fixes a bug that would cause non-editable variables on the front-end to throw a validation error.
@ -152,7 +162,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
### Changed ### Changed
* PHP 7.2 is now the minimum required version for this software. * PHP 7.2 is now the minimum required version for this software.
* Egg variable default values are no longer validated aganist the ruleset when configuring them. Validation of those rules will only occur when editing or creating a server. * Egg variable default values are no longer validated against the ruleset when configuring them. Validation of those rules will only occur when editing or creating a server.
* Changed logger to skip reporting stack-traces on PDO exceptions due to sensitive information being contained within. * Changed logger to skip reporting stack-traces on PDO exceptions due to sensitive information being contained within.
* Changed behavior of allocation IP Address/Ports box to automatically store the value entered if a user unfocuses the field without hitting space. * Changed behavior of allocation IP Address/Ports box to automatically store the value entered if a user unfocuses the field without hitting space.
* Changed order in which allocations are displayed to prioritize those with servers attached (in ascending IP & port order) followed by ascending IP & port order where no server is attached. * Changed order in which allocations are displayed to prioritize those with servers attached (in ascending IP & port order) followed by ascending IP & port order where no server is attached.
@ -183,7 +193,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
### Fixed ### Fixed
* `[rc.1]` — Fixes exception thrown when revoking user sessions. * `[rc.1]` — Fixes exception thrown when revoking user sessions.
* `[rc.1]` — Fixes exception that would occur when trying to delete allocations from a node. * `[rc.1]` — Fixes exception that would occur when trying to delete allocations from a node.
* `[rc.1]` — Fixes exception thown when attempting to adjust mail settings as well as a validation error thrown afterwards. * `[rc.1]` — Fixes exception thrown when attempting to adjust mail settings as well as a validation error thrown afterwards.
* `[rc.1]` — Fixes bug preventing modification of the default value for an Egg variable. * `[rc.1]` — Fixes bug preventing modification of the default value for an Egg variable.
* `[rc.1]` — Fixed a bug that would occur when attempting to reset the daemon secret for a node. * `[rc.1]` — Fixed a bug that would occur when attempting to reset the daemon secret for a node.
* `[rc.1]` — Fix exception thrown when attempting to modify an existing database host. * `[rc.1]` — Fix exception thrown when attempting to modify an existing database host.
@ -208,7 +218,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
## v0.7.0-beta.4 (Derelict Dermodactylus) ## v0.7.0-beta.4 (Derelict Dermodactylus)
### Fixed ### Fixed
* `[beta.3]` — Fixes a bug with the default environment file that was causing an inability to perform a fresh install when running package discovery. * `[beta.3]` — Fixes a bug with the default environment file that was causing an inability to perform a fresh install when running package discovery.
* `[beta.3]` — Fixes an edge case caused by the Laravel 5.5 upgrade that would try to perform an in_array check aganist a null value. * `[beta.3]` — Fixes an edge case caused by the Laravel 5.5 upgrade that would try to perform an in_array check against a null value.
* `[beta.3]` — Fixes a bug that would cause an error when attempting to create a new user on the Panel. * `[beta.3]` — Fixes a bug that would cause an error when attempting to create a new user on the Panel.
* `[beta.3]` — Fixes error handling of the settings service provider when no migrations have been run. * `[beta.3]` — Fixes error handling of the settings service provider when no migrations have been run.
* `[beta.3]` — Fixes validation error when trying to use 'None' as the 'Copy Script From' option for an egg script. * `[beta.3]` — Fixes validation error when trying to use 'None' as the 'Copy Script From' option for an egg script.
@ -227,7 +237,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
## v0.7.0-beta.3 (Derelict Dermodactylus) ## v0.7.0-beta.3 (Derelict Dermodactylus)
### Fixed ### Fixed
* `[beta.2]` — Fixes a bug that would cause an endless exception message stream in the console when attemping to setup environment settings in certain instances. * `[beta.2]` — Fixes a bug that would cause an endless exception message stream in the console when attempting to setup environment settings in certain instances.
* `[beta.2]` — Fixes a bug causing the dropdown menu for a server's egg to display the wrong selected value. * `[beta.2]` — Fixes a bug causing the dropdown menu for a server's egg to display the wrong selected value.
* `[beta.2]` — Fixes a bug that would throw a red page of death when submitting an invalid egg variable value for a server in the Admin CP. * `[beta.2]` — Fixes a bug that would throw a red page of death when submitting an invalid egg variable value for a server in the Admin CP.
* `[beta.2]` — Someone found a `@todo` that I never `@todid` and thus database hosts could not be created without being linked to a node. This is fixed... * `[beta.2]` — Someone found a `@todo` that I never `@todid` and thus database hosts could not be created without being linked to a node. This is fixed...
@ -256,7 +266,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* `[beta.1]` — Fixes bug causing inability to create new servers on the Panel. * `[beta.1]` — Fixes bug causing inability to create new servers on the Panel.
* `[beta.1]` — Fixes bug causing inability to delete an allocation due to misconfigured JS. * `[beta.1]` — Fixes bug causing inability to delete an allocation due to misconfigured JS.
* `[beta.1]` — Fixes bug causing inability to set the IP alias for an allocation to an empty value. * `[beta.1]` — Fixes bug causing inability to set the IP alias for an allocation to an empty value.
* `[beta.1]` — Fixes bug that caused startup changes to not propigate to the server correctly on the first save. * `[beta.1]` — Fixes bug that caused startup changes to not propagate to the server correctly on the first save.
* `[beta.1]` — Fixes bug that prevented subusers from accessing anything over socketio due to a missing permission. * `[beta.1]` — Fixes bug that prevented subusers from accessing anything over socketio due to a missing permission.
### Changed ### Changed
@ -358,7 +368,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* API now returns a useful error displaying what went wrong rather than an obscure 'An Error was Encountered' message when API issues arise. * API now returns a useful error displaying what went wrong rather than an obscure 'An Error was Encountered' message when API issues arise.
* Fixes bug preventing the creation of new files in the file manager due to a missing JS dependency on page load. * Fixes bug preventing the creation of new files in the file manager due to a missing JS dependency on page load.
* Prevent using a service option tag that contains special characters that are not valid. Now only allows alpha-numeric, no spaces or underscores. * Prevent using a service option tag that contains special characters that are not valid. Now only allows alpha-numeric, no spaces or underscores.
* Fix unhandled excpetion due to missing `Log` class when using the API and causing an error. * Fix unhandled exception due to missing `Log` class when using the API and causing an error.
### Changed ### Changed
* Renamed session cookies from `laravel_session` to `pterodactyl_session`. * Renamed session cookies from `laravel_session` to `pterodactyl_session`.
@ -374,7 +384,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* Fixes potential bug with invalid CIDR notation (ex: `192.168.1.1/z`) when adding allocations that could cause over 4 million records to be created at once. * Fixes potential bug with invalid CIDR notation (ex: `192.168.1.1/z`) when adding allocations that could cause over 4 million records to be created at once.
* Fixes bug where daemon was unable to register that certain games had fully booted and were ready to play on. * Fixes bug where daemon was unable to register that certain games had fully booted and were ready to play on.
* Fixes bug causing MySQL user accounts to be corrupted when resetting a password via the panel. * Fixes bug causing MySQL user accounts to be corrupted when resetting a password via the panel.
* Fixes remote timing attack vulnerability due to hmac comparsion in API middleware. * Fixes remote timing attack vulnerability due to hmac comparison in API middleware.
* `[rc.1]` — Server deletion is fixed, caused by removed download table. * `[rc.1]` — Server deletion is fixed, caused by removed download table.
* `[rc.1]` — Server status indication on front-end no longer shows `Error` when server is marked as installing or suspended. * `[rc.1]` — Server status indication on front-end no longer shows `Error` when server is marked as installing or suspended.
* `[rc.1]` — Fixes issues with SteamCMD not registering and installing games properly. * `[rc.1]` — Fixes issues with SteamCMD not registering and installing games properly.
@ -403,10 +413,10 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* API has been completely overhauled to use new permissions system. **Any old API keys will immediately become invalid and fail to operate properly anymore. You will need to generate new keys.** * API has been completely overhauled to use new permissions system. **Any old API keys will immediately become invalid and fail to operate properly anymore. You will need to generate new keys.**
* Cleaned up dynamic database connection setting to use a single function call from the host model. * Cleaned up dynamic database connection setting to use a single function call from the host model.
* Deleting a server safely now continues even if the daemon reports a `HTTP/404` missing server error (requires `Daemon@0.4.0-beta.2.1`) * Deleting a server safely now continues even if the daemon reports a `HTTP/404` missing server error (requires `Daemon@0.4.0-beta.2.1`)
* Changed behavior when modifying server allocation information. You can now remove the default allocation assuming you assing a new allocation at the same time. Reduces the number of steps to change the default allocation for a server. * Changed behavior when modifying server allocation information. You can now remove the default allocation assuming you are passing a new allocation at the same time. Reduces the number of steps to change the default allocation for a server.
* Environment setting commands now attempt to auto-quote strings with spaces in them, as well as comment lines that are edited to avoid manual changes being overwritten. * Environment setting commands now attempt to auto-quote strings with spaces in them, as well as comment lines that are edited to avoid manual changes being overwritten.
* Version in footer of panel now displays correctly if panel is installed using Git rather than a download from source. * Version in footer of panel now displays correctly if panel is installed using Git rather than a download from source.
* Mobile views are now more... viewable. Fixes `col-xs-6` usage thoughout the Admin CP where it was intended to be `col-md-6`. * Mobile views are now more... viewable. Fixes `col-xs-6` usage throughout the Admin CP where it was intended to be `col-md-6`.
* Node Configuration tokens and Download tokens are stored using the cache helpers rather than a database to speed up functions and make use of auto-expiration/deletion functions. * Node Configuration tokens and Download tokens are stored using the cache helpers rather than a database to speed up functions and make use of auto-expiration/deletion functions.
* Old daemon routes using `/remote` have been changed to use `/daemon`, panel changes now reflect this. * Old daemon routes using `/remote` have been changed to use `/daemon`, panel changes now reflect this.
* Only display servers that a user is owner of or subuser of in the Admin CP rather than all servers if the user is marked as an admin. * Only display servers that a user is owner of or subuser of in the Admin CP rather than all servers if the user is marked as an admin.
@ -424,9 +434,9 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* Ability to assign multiple allocations at once when creating a new server. * Ability to assign multiple allocations at once when creating a new server.
* New `humanReadable` macro on `File` facade that accepts a file path and returns a human readable size. (`File::humanReadable(path, precision)`) * New `humanReadable` macro on `File` facade that accepts a file path and returns a human readable size. (`File::humanReadable(path, precision)`)
* Added ability to edit database host details after creation on the system. * Added ability to edit database host details after creation on the system.
* Login attempts and pasword reset requests are now protected by invisible ReCaptcha. This feature can be disabled with a `.env` variable. * Login attempts and password reset requests are now protected by invisible ReCaptcha. This feature can be disabled with a `.env` variable.
* Server listing for individual users is now searchable on the front-end. * Server listing for individual users is now searchable on the front-end.
* Servers that a user is assocaited with as a subuser are now displayed in addition to owned servers when listing users in the Admin CP. * Servers that a user is associated with as a subuser are now displayed in addition to owned servers when listing users in the Admin CP.
* Ability to launch the console in a new window as an individual unit. https://s3.kelp.in/IrTyE.png * Ability to launch the console in a new window as an individual unit. https://s3.kelp.in/IrTyE.png
* Server listing and view in Admin CP now shows the SFTP username/Docker container name. * Server listing and view in Admin CP now shows the SFTP username/Docker container name.
* Administrative server view includes link in navigation to go to server console/frontend management. * Administrative server view includes link in navigation to go to server console/frontend management.
@ -448,7 +458,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* `[beta.2.1]` — Fixed a bug preventing the deletion of a server. * `[beta.2.1]` — Fixed a bug preventing the deletion of a server.
* It is now possible to modify a server's disk limits after the server is created. * It is now possible to modify a server's disk limits after the server is created.
* `[beta.2.1]` — Fixes a bug causing login issues and password reset failures when reCAPTCHA is enabled. * `[beta.2.1]` — Fixes a bug causing login issues and password reset failures when reCAPTCHA is enabled.
* Fixes remote timing attack vulnerability due to hmac comparsion in API middleware. * Fixes remote timing attack vulnerability due to hmac comparison in API middleware.
* `[beta.2.1]` — Fixes bug requiring docker image field to be filled out when adding a service option. * `[beta.2.1]` — Fixes bug requiring docker image field to be filled out when adding a service option.
* `[beta.2.1]` — Fixes inability to mark a user as a non-admin once they were assigned the role. * `[beta.2.1]` — Fixes inability to mark a user as a non-admin once they were assigned the role.
@ -461,7 +471,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
### Changed ### Changed
* Environment setting commands now attempt to auto-quote strings with spaces in them, as well as comment lines that are edited to avoid manual changes being overwritten. * Environment setting commands now attempt to auto-quote strings with spaces in them, as well as comment lines that are edited to avoid manual changes being overwritten.
* Version in footer of panel now displays correctly if panel is installed using Git rather than a download from source. * Version in footer of panel now displays correctly if panel is installed using Git rather than a download from source.
* Mobile views are now more... viewable. Fixes `col-xs-6` usage thoughout the Admin CP where it was intended to be `col-md-6`. * Mobile views are now more... viewable. Fixes `col-xs-6` usage throughout the Admin CP where it was intended to be `col-md-6`.
* Node Configuration tokens and Download tokens are stored using the cache helpers rather than a database to speed up functions and make use of auto-expiration/deletion functions. * Node Configuration tokens and Download tokens are stored using the cache helpers rather than a database to speed up functions and make use of auto-expiration/deletion functions.
* Old daemon routes using `/remote` have been changed to use `/daemon`, panel changes now reflect this. * Old daemon routes using `/remote` have been changed to use `/daemon`, panel changes now reflect this.
* Only display servers that a user is owner of or subuser of in the Admin CP rather than all servers if the user is marked as an admin. * Only display servers that a user is owner of or subuser of in the Admin CP rather than all servers if the user is marked as an admin.
@ -482,7 +492,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
### Changed ### Changed
* Deleting a server safely now continues even if the daemon reports a `HTTP/404` missing server error (requires `Daemon@0.4.0-beta.2.1`) * Deleting a server safely now continues even if the daemon reports a `HTTP/404` missing server error (requires `Daemon@0.4.0-beta.2.1`)
* Changed behavior when modifying server allocation information. You can now remove the default allocation assuming you assing a new allocation at the same time. Reduces the number of steps to change the default allocation for a server. * Changed behavior when modifying server allocation information. You can now remove the default allocation assuming you are passing a new allocation at the same time. Reduces the number of steps to change the default allocation for a server.
### Added ### Added
* Server listing and view in Admin CP now shows the SFTP username/Docker container name. * Server listing and view in Admin CP now shows the SFTP username/Docker container name.
@ -490,7 +500,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
## v0.6.0-beta.2 ## v0.6.0-beta.2
### Fixed ### Fixed
* `[beta.1]` — Fixes task management ststem not running correctly. * `[beta.1]` — Fixes task management system not running correctly.
* `[beta.1]` — Fixes API endpoint for command sending missing the required class definition. * `[beta.1]` — Fixes API endpoint for command sending missing the required class definition.
* `[beta.1]` — Fixes panel looking for an old compiled classfile that is no longer used. This was causing errors relating to `missing class DingoAPI` when trying to upgrade the panel. * `[beta.1]` — Fixes panel looking for an old compiled classfile that is no longer used. This was causing errors relating to `missing class DingoAPI` when trying to upgrade the panel.
* `[beta.1]` — Should fix render issues when trying to edit some files via the panel file editor. * `[beta.1]` — Should fix render issues when trying to edit some files via the panel file editor.
@ -507,9 +517,9 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* `[pre.7]` — Terminal is now fixed to actually output all lines, rather than leaving one hanging in neverland until the browser is resized. * `[pre.7]` — Terminal is now fixed to actually output all lines, rather than leaving one hanging in neverland until the browser is resized.
### Added ### Added
* Login attempts and pasword reset requests are now protected by invisible ReCaptcha. This feature can be disabled with a `.env` variable. * Login attempts and password reset requests are now protected by invisible ReCaptcha. This feature can be disabled with a `.env` variable.
* Server listing for individual users is now searchable on the front-end. * Server listing for individual users is now searchable on the front-end.
* Servers that a user is assocaited with as a subuser are now displayed in addition to owned servers when listing users in the Admin CP. * Servers that a user is associated with as a subuser are now displayed in addition to owned servers when listing users in the Admin CP.
### Changed ### Changed
* Subuser permissions are now stored in `Permission::listPermissions()` to make views way cleaner and make adding to views significantly cleaner. * Subuser permissions are now stored in `Permission::listPermissions()` to make views way cleaner and make adding to views significantly cleaner.
@ -532,7 +542,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
## v0.6.0-pre.6 ## v0.6.0-pre.6
### Fixed ### Fixed
* `[pre.5]` — Console based server rebuild tool now actually rebuilds the servers with the correct information. * `[pre.5]` — Console based server rebuild tool now actually rebuilds the servers with the correct information.
* `[pre.5]` — Fixes typo and wrong docker contaienr for certain applications. * `[pre.5]` — Fixes typo and wrong docker container for certain applications.
### Changed ### Changed
* Removed all old theme JS and CSS folders to cleanup and avoid confusion in the future. * Removed all old theme JS and CSS folders to cleanup and avoid confusion in the future.
@ -545,7 +555,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* New theme applied to Admin CP. Many graphical changes were made, some data was moved around and some display data changed. Too much was changed to feasibly log it all in here. Major breaking changes or notable new features will be logged. * New theme applied to Admin CP. Many graphical changes were made, some data was moved around and some display data changed. Too much was changed to feasibly log it all in here. Major breaking changes or notable new features will be logged.
* New server creation page now makes significantly less AJAX calls and is much quicker to respond. * New server creation page now makes significantly less AJAX calls and is much quicker to respond.
* Server and Node view pages wee modified to split tabs into individual pages to make re-themeing and modifications significantly easier, and reduce MySQL query loads on page. * Server and Node view pages wee modified to split tabs into individual pages to make re-themeing and modifications significantly easier, and reduce MySQL query loads on page.
* `[pre.4]` — Service and Pack magement overhauled to be faster, cleaner, and more extensible in the future. * `[pre.4]` — Service and Pack management overhauled to be faster, cleaner, and more extensible in the future.
* Most of the backend `UnhandledException` display errors now include a clearer error that directs admins to the program's logs. * Most of the backend `UnhandledException` display errors now include a clearer error that directs admins to the program's logs.
* Table seeders for services now can be run during upgrades and will attempt to locate and update, or create new if not found in the database. * Table seeders for services now can be run during upgrades and will attempt to locate and update, or create new if not found in the database.
* Many structural changes to the database and `Pterodactyl\Models` classes that would flood this changelog if they were all included. All required migrations included to handle database changes. * Many structural changes to the database and `Pterodactyl\Models` classes that would flood this changelog if they were all included. All required migrations included to handle database changes.
@ -562,7 +572,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* Fixes bug where daemon was unable to register that certain games had fully booted and were ready to play on. * Fixes bug where daemon was unable to register that certain games had fully booted and were ready to play on.
* Fixes bug causing MySQL user accounts to be corrupted when resetting a password via the panel. * Fixes bug causing MySQL user accounts to be corrupted when resetting a password via the panel.
* `[pre.4]` — Multiple clients refreshing the console no longer clears the console for all parties involved... sorry about that. * `[pre.4]` — Multiple clients refreshing the console no longer clears the console for all parties involved... sorry about that.
* `[pre.4]` — Fixes bug in environment setting script that would not remeber defaults and try to re-assign values. * `[pre.4]` — Fixes bug in environment setting script that would not remember defaults and try to re-assign values.
### Added ### Added
* Ability to assign multiple allocations at once when creating a new server. * Ability to assign multiple allocations at once when creating a new server.
@ -648,7 +658,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
* Fixes bug that would allow creating multiple subusers with the same email address. * Fixes bug that would allow creating multiple subusers with the same email address.
* Fixes bug where Sponge servers were improperly tagged as a spigot server in the daemon causing issues when booting or modifying configuration files. * Fixes bug where Sponge servers were improperly tagged as a spigot server in the daemon causing issues when booting or modifying configuration files.
* Use transpiled ES6 -> ES5 filemanager code in browsers. * Use transpiled ES6 -> ES5 filemanager code in browsers.
* Fixes service option name displaying the name of a nwly added variable after the variable is added and until the page is refreshed. (see #208) * Fixes service option name displaying the name of a newly added variable after the variable is added and until the page is refreshed. (see #208)
### Changed ### Changed
* Filemanager and EULA checking javascript is now written in pure ES6 code rather than as a blade-syntax template. This allows the use of babel to transpile into ES5 as a minified version. * Filemanager and EULA checking javascript is now written in pure ES6 code rather than as a blade-syntax template. This allows the use of babel to transpile into ES5 as a minified version.
@ -732,14 +742,14 @@ After nearly a month in the works, version `v0.5.0` is finally here! 🎉
* Small check for current node status that shows up to the left of the name when viewing a listing of all nodes. * Small check for current node status that shows up to the left of the name when viewing a listing of all nodes.
* Support for creating server without having to assign a node and allocation manually. Simply select the checkbox or pass `auto_deploy=true` to the API to auto-select a node and allocation given a location. * Support for creating server without having to assign a node and allocation manually. Simply select the checkbox or pass `auto_deploy=true` to the API to auto-select a node and allocation given a location.
* Support for setting IP Aliases through the panel on the node overview page. Also cleaned up allocation removal. * Support for setting IP Aliases through the panel on the node overview page. Also cleaned up allocation removal.
* Support for renaming files through the panel's file mananger. * Support for renaming files through the panel's file manager.
### Changed ### Changed
* Servers are now queued for deletion to allow for cancellation of deletion, as well as run in the background to speed up page loading. * Servers are now queued for deletion to allow for cancellation of deletion, as well as run in the background to speed up page loading.
* Switched to new graphing library to make graphs less... broken. * Switched to new graphing library to make graphs less... broken.
* Rebuild triggers are only sent to the node if there is actually something changed that requires a rebuild. * Rebuild triggers are only sent to the node if there is actually something changed that requires a rebuild.
* Dependencies are now hard-coded into the `composer.json` file to prevent users installing slightly different versions with different features or bugs. * Dependencies are now hard-coded into the `composer.json` file to prevent users installing slightly different versions with different features or bugs.
* Server related tasks now use the lowest priorty queue to prevent clogging the pipes when there are more important tasks to be run by the panel. * Server related tasks now use the lowest priority queue to prevent clogging the pipes when there are more important tasks to be run by the panel.
* Dates displayed in the file manager are now more user friendly. * Dates displayed in the file manager are now more user friendly.
* Creating a user, server, or node now returns `HTTP/1.1 200` and a JSON element with the user/server/node's ID. * Creating a user, server, or node now returns `HTTP/1.1 200` and a JSON element with the user/server/node's ID.
* Environment setting script is much more user friendly and does not require an excessive amount of clicking and typing. * Environment setting script is much more user friendly and does not require an excessive amount of clicking and typing.
@ -808,7 +818,7 @@ After nearly a month in the works, version `v0.5.0` is finally here! 🎉
* Switched to new graphing library to make graphs less... broken. * Switched to new graphing library to make graphs less... broken.
* Rebuild triggers are only sent to the node if there is actually something changed that requires a rebuild. * Rebuild triggers are only sent to the node if there is actually something changed that requires a rebuild.
* Dependencies are now hard-coded into the `composer.json` file to prevent users installing slightly different versions with different features or bugs. * Dependencies are now hard-coded into the `composer.json` file to prevent users installing slightly different versions with different features or bugs.
* Server related tasks now use the lowest priorty queue to prevent clogging the pipes when there are more important tasks to be run by the panel. * Server related tasks now use the lowest priority queue to prevent clogging the pipes when there are more important tasks to be run by the panel.
* Decompressing files now shows a pop-over box that does not dismiss until it is complete. * Decompressing files now shows a pop-over box that does not dismiss until it is complete.
* Dates displayed in the file manager are now more user friendly. * Dates displayed in the file manager are now more user friendly.
@ -868,7 +878,7 @@ After nearly a month in the works, version `v0.5.0` is finally here! 🎉
### Added ### Added
* Support for creating server without having to assign a node and allocation manually. Simply select the checkbox or pass `auto_deploy=true` to the API to auto-select a node and allocation given a location. * Support for creating server without having to assign a node and allocation manually. Simply select the checkbox or pass `auto_deploy=true` to the API to auto-select a node and allocation given a location.
* Support for setting IP Aliases through the panel on the node overview page. Also cleaned up allocation removal. * Support for setting IP Aliases through the panel on the node overview page. Also cleaned up allocation removal.
* Support for renaming files through the panel's file mananger. * Support for renaming files through the panel's file manager.
### Changed ### Changed
* Prevent clicking server start button until server is completely off, not just stopping. * Prevent clicking server start button until server is completely off, not just stopping.

View file

@ -4,14 +4,14 @@ We're glad you want to help us out and make this panel the best that it can be!
### Project Branches ### Project Branches
This section mainly applies to those with read/write access to our repositories, but can be helpful for others. 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 previous discussed as being able to be pushed right into `develop`. 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 unit tests at minimum (where applicable). There is a lot of un-covered code currently, so as you are doing things please be looking for places that you can write tests. 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 ### 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. 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.
### Code Guidelines ### 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, 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.
@ -32,13 +32,13 @@ class ProcessScheduleService
``` ```
### Responsible Disclosure ### 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 into it 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 us at `support@pterodactyl.io`.
### Where to find Us ### 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 problem open an issue on here for us to take a look at it. We also accept feature requests here as well. 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://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.

View file

@ -58,7 +58,7 @@ class AppSettingsCommand extends Command
* @var string * @var string
*/ */
protected $signature = 'p:environment:setup protected $signature = 'p:environment:setup
{--new-salt : Wether or not to generate a new salt for Hashids.} {--new-salt : Whether or not to generate a new salt for Hashids.}
{--author= : The email that services created on this instance should be linked to.} {--author= : The email that services created on this instance should be linked to.}
{--url= : The URL that this Panel is running on.} {--url= : The URL that this Panel is running on.}
{--timezone= : The timezone to use for Panel times.} {--timezone= : The timezone to use for Panel times.}

View file

@ -59,6 +59,7 @@ class EmailSettingsCommand extends Command
/** /**
* Handle command execution. * Handle command execution.
* @throws \Pterodactyl\Exceptions\PterodactylException
*/ */
public function handle() public function handle()
{ {

View file

@ -84,7 +84,7 @@ class InfoCommand extends Command
['Host', $this->config->get("database.connections.{$driver}.host")], ['Host', $this->config->get("database.connections.{$driver}.host")],
['Port', $this->config->get("database.connections.{$driver}.port")], ['Port', $this->config->get("database.connections.{$driver}.port")],
['Database', $this->config->get("database.connections.{$driver}.database")], ['Database', $this->config->get("database.connections.{$driver}.database")],
['Usernamne', $this->config->get("database.connections.{$driver}.username")], ['Username', $this->config->get("database.connections.{$driver}.username")],
], 'compact'); ], 'compact');
$this->output->title('Email Configuration'); $this->output->title('Email Configuration');

View file

@ -31,8 +31,8 @@ class BulkPowerActionCommand extends Command
*/ */
protected $signature = 'p:server:bulk-power protected $signature = 'p:server:bulk-power
{action : The action to perform (start, stop, restart, kill)} {action : The action to perform (start, stop, restart, kill)}
{--servers= : A comma seperated list of servers.} {--servers= : A comma separated list of servers.}
{--nodes= : A comma seperated list of nodes.}'; {--nodes= : A comma separated list of nodes.}';
/** /**
* @var string * @var string

View file

@ -59,7 +59,7 @@ interface AllocationRepositoryInterface extends RepositoryInterface
public function getAssignedAllocationIds(int $server): array; public function getAssignedAllocationIds(int $server): array;
/** /**
* Return a concated result set of node ips that already have at least one * Return a concatenated result set of node ips that already have at least one
* server assigned to that IP. This allows for filtering out sets for * server assigned to that IP. This allows for filtering out sets for
* dedicated allocation IPs. * dedicated allocation IPs.
* *

View file

@ -62,7 +62,7 @@ interface ServerRepositoryInterface extends BaseRepositoryInterface
public function delete(): ResponseInterface; public function delete(): ResponseInterface;
/** /**
* Return detials on a specific server. * Return details on a specific server.
* *
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
*/ */

View file

@ -19,7 +19,7 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
public function setConnection(string $connection); public function setConnection(string $connection);
/** /**
* Return the connection to execute statements aganist. * Return the connection to execute statements against.
* *
* @return string * @return string
*/ */

View file

@ -57,5 +57,5 @@ interface EggRepositoryInterface extends RepositoryInterface
* @param int $service * @param int $service
* @return bool * @return bool
*/ */
public function isCopiableScript(int $copyFromId, int $service): bool; public function isCopyableScript(int $copyFromId, int $service): bool;
} }

View file

@ -29,7 +29,7 @@ interface RepositoryInterface
public function getBuilder(); public function getBuilder();
/** /**
* Returns the colummns to be selected or returned by the query. * Returns the columns to be selected or returned by the query.
* *
* @return mixed * @return mixed
*/ */
@ -59,7 +59,7 @@ interface RepositoryInterface
public function withFreshModel(); public function withFreshModel();
/** /**
* Set wether or not the repository should return a fresh model * Set whether or not the repository should return a fresh model
* when changes are committed. * when changes are committed.
* *
* @param bool $fresh * @param bool $fresh

View file

@ -119,7 +119,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
public function getByUuid(string $uuid): Server; public function getByUuid(string $uuid): Server;
/** /**
* Return all of the servers that should have a power action performed aganist them. * Return all of the servers that should have a power action performed against them.
* *
* @param int[] $servers * @param int[] $servers
* @param int[] $nodes * @param int[] $nodes

View file

@ -18,8 +18,8 @@ interface UserRepositoryInterface extends RepositoryInterface, SearchableInterfa
/** /**
* Return all matching models for a user in a format that can be used for dropdowns. * Return all matching models for a user in a format that can be used for dropdowns.
* *
* @param string $query * @param string|null $query
* @return \Illuminate\Support\Collection * @return \Illuminate\Support\Collection
*/ */
public function filterUsersByQuery(string $query): Collection; public function filterUsersByQuery(?string $query): Collection;
} }

View file

@ -41,7 +41,7 @@ class EggRetrievalController extends Controller
} }
/** /**
* Return a JSON array of Eggs and the SHA1 hash of thier configuration file. * Return a JSON array of Eggs and the SHA1 hash of their configuration file.
* *
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */

View file

@ -65,6 +65,7 @@ class ApiController extends Controller
* Render view allowing an admin to create a new application API key. * Render view allowing an admin to create a new application API key.
* *
* @return \Illuminate\View\View * @return \Illuminate\View\View
* @throws \ReflectionException
*/ */
public function create(): View public function create(): View
{ {

View file

@ -103,7 +103,6 @@ class LocationController extends Controller
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* *
* @throws \Throwable * @throws \Throwable
* @throws \Watson\Validating\ValidationException
*/ */
public function create(LocationFormRequest $request) public function create(LocationFormRequest $request)
{ {
@ -121,7 +120,6 @@ class LocationController extends Controller
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* *
* @throws \Throwable * @throws \Throwable
* @throws \Watson\Validating\ValidationException
*/ */
public function update(LocationFormRequest $request, Location $location) public function update(LocationFormRequest $request, Location $location)
{ {

View file

@ -90,10 +90,11 @@ class EggVariableController extends Controller
* Handle a request to create a new Egg variable. * Handle a request to create a new Egg variable.
* *
* @param \Pterodactyl\Http\Requests\Admin\Egg\EggVariableFormRequest $request * @param \Pterodactyl\Http\Requests\Admin\Egg\EggVariableFormRequest $request
* @param \Pterodactyl\Models\Egg $egg * @param \Pterodactyl\Models\Egg $egg
* *
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Service\Egg\Variable\BadValidationRuleException
* @throws \Pterodactyl\Exceptions\Service\Egg\Variable\ReservedVariableNameException * @throws \Pterodactyl\Exceptions\Service\Egg\Variable\ReservedVariableNameException
*/ */
public function store(EggVariableFormRequest $request, Egg $egg): RedirectResponse public function store(EggVariableFormRequest $request, Egg $egg): RedirectResponse

View file

@ -35,6 +35,7 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface; use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface; use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface; use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface;
use Pterodactyl\Http\Requests\Admin\Servers\Databases\StoreServerDatabaseRequest;
class ServersController extends Controller class ServersController extends Controller
{ {
@ -375,9 +376,15 @@ class ServersController extends Controller
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return \Illuminate\View\View * @return \Illuminate\View\View
*
* @throws \Pterodactyl\Exceptions\DisplayException
*/ */
public function viewManage(Server $server) public function viewManage(Server $server)
{ {
if ($server->installed > 1) {
throw new DisplayException('This server is in a failed installation state and must be deleted and recreated.');
}
return view('admin.servers.view.manage', ['server' => $server]); return view('admin.servers.view.manage', ['server' => $server]);
} }
@ -462,6 +469,7 @@ class ServersController extends Controller
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
*/ */
public function rebuildContainer(Server $server) public function rebuildContainer(Server $server)
{ {
@ -540,7 +548,8 @@ class ServersController extends Controller
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* *
* @throws \Pterodactyl\Exceptions\DisplayException * @throws \Illuminate\Validation\ValidationException
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/ */
@ -556,15 +565,13 @@ class ServersController extends Controller
/** /**
* Creates a new database assigned to a specific server. * Creates a new database assigned to a specific server.
* *
* @param \Illuminate\Http\Request $request * @param \Pterodactyl\Http\Requests\Admin\Servers\Databases\StoreServerDatabaseRequest $request
* @param int $server * @param int $server
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* *
* @throws \Exception * @throws \Exception
* @throws \Pterodactyl\Exceptions\DisplayException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
*/ */
public function newDatabase(Request $request, $server) public function newDatabase(StoreServerDatabaseRequest $request, $server)
{ {
$this->databaseManagementService->create($server, [ $this->databaseManagementService->create($server, [
'database' => $request->input('database'), 'database' => $request->input('database'),

View file

@ -76,6 +76,8 @@ class AdvancedController extends Controller
/** /**
* @param \Pterodactyl\Http\Requests\Admin\Settings\AdvancedSettingsFormRequest $request * @param \Pterodactyl\Http\Requests\Admin\Settings\AdvancedSettingsFormRequest $request
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/ */
public function update(AdvancedSettingsFormRequest $request): RedirectResponse public function update(AdvancedSettingsFormRequest $request): RedirectResponse
{ {

View file

@ -74,6 +74,8 @@ class IndexController extends Controller
* *
* @param \Pterodactyl\Http\Requests\Admin\Settings\BaseSettingsFormRequest $request * @param \Pterodactyl\Http\Requests\Admin\Settings\BaseSettingsFormRequest $request
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/ */
public function update(BaseSettingsFormRequest $request): RedirectResponse public function update(BaseSettingsFormRequest $request): RedirectResponse
{ {

View file

@ -83,7 +83,9 @@ class MailController extends Controller
* @param \Pterodactyl\Http\Requests\Admin\Settings\MailSettingsFormRequest $request * @param \Pterodactyl\Http\Requests\Admin\Settings\MailSettingsFormRequest $request
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* *
* @throws \Pterodactyl\Exceptions\DisplayException * @throws DisplayException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/ */
public function update(MailSettingsFormRequest $request): RedirectResponse public function update(MailSettingsFormRequest $request): RedirectResponse
{ {

View file

@ -104,8 +104,6 @@ class DatabaseController extends ApplicationApiController
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
* *
* @throws \Exception * @throws \Exception
* @throws \Pterodactyl\Exceptions\DisplayException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
*/ */
public function store(StoreServerDatabaseRequest $request): JsonResponse public function store(StoreServerDatabaseRequest $request): JsonResponse
{ {

View file

@ -96,7 +96,7 @@ class SecurityController extends Controller
} }
/** /**
* Verifies that 2FA token recieved is valid and will work on the account. * Verifies that 2FA token received is valid and will work on the account.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response

View file

@ -101,7 +101,7 @@ class FileActionsController extends Controller
{ {
$server = $request->attributes->get('server'); $server = $request->attributes->get('server');
$dirname = pathinfo($file, PATHINFO_DIRNAME); $dirname = str_replace('\\', '/', pathinfo($file, PATHINFO_DIRNAME));
try { try {
$content = $this->repository->setServer($server)->setToken($request->attributes->get('server_token'))->getContent($file); $content = $this->repository->setServer($server)->setToken($request->attributes->get('server_token'))->getContent($file);
} catch (RequestException $exception) { } catch (RequestException $exception) {

View file

@ -111,7 +111,7 @@ class Kernel extends HttpKernel
// Server specific middleware (used for authenticating access to resources) // Server specific middleware (used for authenticating access to resources)
// //
// These are only used for individual server authentication, and not gloabl // These are only used for individual server authentication, and not global
// actions from other resources. They are defined in the route files. // actions from other resources. They are defined in the route files.
'server..database' => DatabaseBelongsToServer::class, 'server..database' => DatabaseBelongsToServer::class,
'server..subuser' => SubuserBelongsToServer::class, 'server..subuser' => SubuserBelongsToServer::class,

View file

@ -10,7 +10,7 @@ class AuthenticateApplicationUser
{ {
/** /**
* Authenticate that the currently authenticated user is an administrator * Authenticate that the currently authenticated user is an administrator
* and should be allowed to proceede through the application API. * and should be allowed to proceed through the application API.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next

View file

@ -25,7 +25,7 @@ class RequireTwoFactorAuthentication
private $alert; private $alert;
/** /**
* The names of routes that should be accessable without 2FA enabled. * The names of routes that should be accessible without 2FA enabled.
* *
* @var array * @var array
*/ */

View file

@ -33,7 +33,7 @@ class AuthenticateAsSubuser
} }
/** /**
* Determine if a subuser has permissions to access a server, if so set thier access token. * Determine if a subuser has permissions to access a server, if so set their access token.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next

View file

@ -15,15 +15,9 @@ class TrustProxies extends Middleware
protected $proxies; protected $proxies;
/** /**
* The current proxy header mappings. * The headers that should be used to detect proxies.
* *
* @var array * @var int
*/ */
protected $headers = [ protected $headers = Request::HEADER_X_FORWARDED_ALL;
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
} }

View file

@ -10,13 +10,15 @@ class StoreApplicationApiKeyRequest extends AdminFormRequest
{ {
/** /**
* @return array * @return array
* @throws \ReflectionException
* @throws \ReflectionException
*/ */
public function rules() public function rules()
{ {
$modelRules = ApiKey::getCreateRules(); $modelRules = ApiKey::getCreateRules();
return collect(AdminAcl::getResourceList())->mapWithKeys(function ($resource) use ($modelRules) { return collect(AdminAcl::getResourceList())->mapWithKeys(function ($resource) use ($modelRules) {
return [AdminAcl::COLUMN_IDENTIFER . $resource => $modelRules['r_' . $resource]]; return [AdminAcl::COLUMN_IDENTIFIER . $resource => $modelRules['r_' . $resource]];
})->merge(['memo' => $modelRules['memo']])->toArray(); })->merge(['memo' => $modelRules['memo']])->toArray();
} }
@ -33,7 +35,7 @@ class StoreApplicationApiKeyRequest extends AdminFormRequest
public function getKeyPermissions(): array public function getKeyPermissions(): array
{ {
return collect($this->validated())->filter(function ($value, $key) { return collect($this->validated())->filter(function ($value, $key) {
return substr($key, 0, strlen(AdminAcl::COLUMN_IDENTIFER)) === AdminAcl::COLUMN_IDENTIFER; return substr($key, 0, strlen(AdminAcl::COLUMN_IDENTIFIER)) === AdminAcl::COLUMN_IDENTIFIER;
})->toArray(); })->toArray();
} }
} }

View file

@ -0,0 +1,22 @@
<?php
namespace Pterodactyl\Http\Requests\Admin\Servers\Databases;
use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
class StoreServerDatabaseRequest extends AdminFormRequest
{
/**
* Validation rules for database creation.
*
* @return array
*/
public function rules(): array
{
return [
'database' => 'required|string|min:1|max:24',
'remote' => 'required|string|regex:/^[0-9%.]{1,15}$/',
'database_host_id' => 'required|integer|exists:database_hosts,id',
];
}
}

View file

@ -8,7 +8,7 @@ use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
class MailSettingsFormRequest extends AdminFormRequest class MailSettingsFormRequest extends AdminFormRequest
{ {
/** /**
* Return rules to validate mail settings POST data aganist. * Return rules to validate mail settings POST data against.
* *
* @return array * @return array
*/ */

View file

@ -38,7 +38,7 @@ abstract class ApplicationApiRequest extends FormRequest
/** /**
* Determine if the current user is authorized to perform * Determine if the current user is authorized to perform
* the requested action aganist the API. * the requested action against the API.
* *
* @return bool * @return bool
* *

View file

@ -19,7 +19,7 @@ class StoreLocationRequest extends ApplicationApiRequest
protected $permission = AdminAcl::WRITE; protected $permission = AdminAcl::WRITE;
/** /**
* Rules to validate the request aganist. * Rules to validate the request against.
* *
* @return array * @return array
*/ */

View file

@ -20,7 +20,7 @@ class UpdateLocationRequest extends StoreLocationRequest
} }
/** /**
* Rules to validate this request aganist. * Rules to validate this request against.
* *
* @return array * @return array
*/ */

View file

@ -26,7 +26,7 @@ class StoreServerDatabaseRequest extends ApplicationApiRequest
{ {
return [ return [
'database' => 'required|string|min:1|max:24', 'database' => 'required|string|min:1|max:24',
'remote' => 'required|string|min:1', 'remote' => 'required|string|regex:/^[0-9%.]{1,15}$/',
'host' => 'required|integer|exists:database_hosts,id', 'host' => 'required|integer|exists:database_hosts,id',
]; ];
} }

View file

@ -7,7 +7,7 @@ use Pterodactyl\Models\Server;
class UpdateServerBuildConfigurationRequest extends ServerWriteRequest class UpdateServerBuildConfigurationRequest extends ServerWriteRequest
{ {
/** /**
* Return the rules to validate this request aganist. * Return the rules to validate this request against.
* *
* @return array * @return array
*/ */

View file

@ -19,7 +19,7 @@ class UpdateServerStartupRequest extends ApplicationApiRequest
protected $permission = AdminAcl::WRITE; protected $permission = AdminAcl::WRITE;
/** /**
* Validation rules to run the input aganist. * Validation rules to run the input against.
* *
* @return array * @return array
*/ */

View file

@ -8,7 +8,7 @@ abstract class ClientApiRequest extends ApplicationApiRequest
{ {
/** /**
* Determine if the current user is authorized to perform * Determine if the current user is authorized to perform
* the requested action aganist the API. * the requested action against the API.
* *
* @return bool * @return bool
*/ */

View file

@ -17,7 +17,7 @@ class SendCommandRequest extends GetServerRequest
} }
/** /**
* Rules to validate this request aganist. * Rules to validate this request against.
* *
* @return array * @return array
*/ */

View file

@ -18,7 +18,7 @@ class SendPowerRequest extends ClientApiRequest
} }
/** /**
* Rules to validate this request aganist. * Rules to validate this request against.
* *
* @return array * @return array
*/ */

View file

@ -7,7 +7,7 @@ use Pterodactyl\Http\Requests\FrontendUserFormRequest;
class StoreAccountKeyRequest extends FrontendUserFormRequest class StoreAccountKeyRequest extends FrontendUserFormRequest
{ {
/** /**
* Rules to validate the request input aganist before storing * Rules to validate the request input against before storing
* an account API key. * an account API key.
* *
* @return array * @return array

View file

@ -19,7 +19,7 @@ class DeleteServerDatabaseRequest extends ServerFormRequest
} }
/** /**
* Return the user permission to validate this request aganist. * Return the user permission to validate this request against.
* *
* @return string * @return string
*/ */
@ -29,7 +29,7 @@ class DeleteServerDatabaseRequest extends ServerFormRequest
} }
/** /**
* Rules to validate this request aganist. * Rules to validate this request against.
* *
* @return array * @return array
*/ */

View file

@ -19,7 +19,7 @@ class StoreServerDatabaseRequest extends ServerFormRequest
} }
/** /**
* Return the user permission to validate this request aganist. * Return the user permission to validate this request against.
* *
* @return string * @return string
*/ */
@ -29,7 +29,7 @@ class StoreServerDatabaseRequest extends ServerFormRequest
} }
/** /**
* Rules to validate this request aganist. * Rules to validate this request against.
* *
* @return array * @return array
*/ */

View file

@ -12,7 +12,7 @@ namespace Pterodactyl\Http\Requests\Server;
class ScheduleCreationFormRequest extends ServerFormRequest class ScheduleCreationFormRequest extends ServerFormRequest
{ {
/** /**
* Permission to validate this request aganist. * Permission to validate this request against.
* *
* @return string * @return string
*/ */

View file

@ -8,7 +8,7 @@ use Pterodactyl\Http\Requests\FrontendUserFormRequest;
abstract class ServerFormRequest extends FrontendUserFormRequest abstract class ServerFormRequest extends FrontendUserFormRequest
{ {
/** /**
* Return the user permission to validate this request aganist. * Return the user permission to validate this request against.
* *
* @return string * @return string
*/ */

View file

@ -7,7 +7,7 @@ use Pterodactyl\Http\Requests\Server\ServerFormRequest;
class SubuserStoreFormRequest extends ServerFormRequest class SubuserStoreFormRequest extends ServerFormRequest
{ {
/** /**
* Return the user permission to validate this request aganist. * Return the user permission to validate this request against.
* *
* @return string * @return string
*/ */
@ -17,7 +17,7 @@ class SubuserStoreFormRequest extends ServerFormRequest
} }
/** /**
* The rules to validate this request submission aganist. * The rules to validate this request submission against.
* *
* @return array * @return array
*/ */

View file

@ -7,7 +7,7 @@ use Pterodactyl\Http\Requests\Server\ServerFormRequest;
class SubuserUpdateFormRequest extends ServerFormRequest class SubuserUpdateFormRequest extends ServerFormRequest
{ {
/** /**
* Return the user permission to validate this request aganist. * Return the user permission to validate this request against.
* *
* @return string * @return string
*/ */
@ -17,7 +17,7 @@ class SubuserUpdateFormRequest extends ServerFormRequest
} }
/** /**
* The rules to validate this request submission aganist. * The rules to validate this request submission against.
* *
* @return array * @return array
*/ */

View file

@ -20,7 +20,7 @@ use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
class UpdateFileContentsFormRequest extends ServerFormRequest class UpdateFileContentsFormRequest extends ServerFormRequest
{ {
/** /**
* Return the permission string to validate this request aganist. * Return the permission string to validate this request against.
* *
* @return string * @return string
*/ */

View file

@ -92,7 +92,7 @@ class RunTaskJob extends Job implements ShouldQueue
return; return;
} }
// Perform the provided task aganist the daemon. // Perform the provided task against the daemon.
switch ($task->action) { switch ($task->action) {
case 'power': case 'power':
$this->powerRepository->setServer($server) $this->powerRepository->setServer($server)

View file

@ -95,7 +95,7 @@ class ApiKey extends Model implements CleansAttributes, ValidableContract
]; ];
/** /**
* Rules to protect aganist invalid data entry to DB. * Rules to protect against invalid data entry to DB.
* *
* @var array * @var array
*/ */

View file

@ -90,7 +90,7 @@ class DatabaseHost extends Model implements CleansAttributes, ValidableContract
} }
/** /**
* Gets the databases assocaited with this host. * Gets the databases associated with this host.
* *
* @return \Illuminate\Database\Eloquent\Relations\HasMany * @return \Illuminate\Database\Eloquent\Relations\HasMany
*/ */

View file

@ -82,6 +82,7 @@ class EggVariable extends Model implements CleansAttributes, ValidableContract
]; ];
/** /**
* @param $value
* @return bool * @return bool
*/ */
public function getRequiredAttribute($value) public function getRequiredAttribute($value)

View file

@ -53,7 +53,7 @@ class Location extends Model implements CleansAttributes, ValidableContract
]; ];
/** /**
* Gets the nodes in a specificed location. * Gets the nodes in a specified location.
* *
* @return \Illuminate\Database\Eloquent\Relations\HasMany * @return \Illuminate\Database\Eloquent\Relations\HasMany
*/ */

View file

@ -41,7 +41,6 @@ class Node extends Model implements CleansAttributes, ValidableContract
* @var array * @var array
*/ */
protected $casts = [ protected $casts = [
'public' => 'integer',
'location_id' => 'integer', 'location_id' => 'integer',
'memory' => 'integer', 'memory' => 'integer',
'disk' => 'integer', 'disk' => 'integer',
@ -228,5 +227,4 @@ class Node extends Model implements CleansAttributes, ValidableContract
{ {
return $this->hasMany(Allocation::class); return $this->hasMany(Allocation::class);
} }
}
}

View file

@ -188,7 +188,7 @@ class User extends Model implements
} }
/** /**
* Store the username as a lowecase string. * Store the username as a lowercase string.
* *
* @param string $value * @param string $value
*/ */
@ -198,7 +198,7 @@ class User extends Model implements
} }
/** /**
* Return a concated result for the accounts full name. * Return a concatenated result for the accounts full name.
* *
* @return string * @return string
*/ */

View file

@ -60,7 +60,7 @@ class AccountCreated extends Notification implements ShouldQueue
{ {
$message = (new MailMessage) $message = (new MailMessage)
->greeting('Hello ' . $this->user->name . '!') ->greeting('Hello ' . $this->user->name . '!')
->line('You are recieving this email because an account has been created for you on ' . config('app.name') . '.') ->line('You are receiving this email because an account has been created for you on ' . config('app.name') . '.')
->line('Username: ' . $this->user->username) ->line('Username: ' . $this->user->username)
->line('Email: ' . $this->user->email); ->line('Email: ' . $this->user->email);

View file

@ -17,8 +17,6 @@ class AuthServiceProvider extends ServiceProvider
/** /**
* Register any application authentication / authorization services. * Register any application authentication / authorization services.
*
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
*/ */
public function boot() public function boot()
{ {

View file

@ -27,7 +27,7 @@ class HashidsServiceProvider extends ServiceProvider
return new Hashids( return new Hashids(
$config->get('hashids.salt', ''), $config->get('hashids.salt', ''),
$config->get('hashids.length', 0), $config->get('hashids.length', 0),
$config->get('hashids.alphabet', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890') $config->get('hashids.alphabet', 'abcdefghijkmlnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')
); );
}); });

View file

@ -2,7 +2,7 @@
namespace Pterodactyl\Providers; namespace Pterodactyl\Providers;
use Illuminate\Contracts\Logging\Log; use Psr\Log\LoggerInterface as Log;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Encryption\Encrypter; use Illuminate\Contracts\Encryption\Encrypter;
@ -62,7 +62,7 @@ class SettingsServiceProvider extends ServiceProvider
* *
* @param \Illuminate\Contracts\Config\Repository $config * @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter * @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
* @param \Illuminate\Contracts\Logging\Log $log * @param \Psr\Log\LoggerInterface $log
* @param \Pterodactyl\Contracts\Repository\SettingsRepositoryInterface $settings * @param \Pterodactyl\Contracts\Repository\SettingsRepositoryInterface $settings
*/ */
public function boot(ConfigRepository $config, Encrypter $encrypter, Log $log, SettingsRepositoryInterface $settings) public function boot(ConfigRepository $config, Encrypter $encrypter, Log $log, SettingsRepositoryInterface $settings)

View file

@ -12,6 +12,7 @@ class CommandRepository extends BaseRepository implements CommandRepositoryInter
* *
* @param string $command * @param string $command
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function send(string $command): ResponseInterface public function send(string $command): ResponseInterface
{ {

View file

@ -12,6 +12,7 @@ class ConfigurationRepository extends BaseRepository implements ConfigurationRep
* *
* @param array $overrides * @param array $overrides
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function update(array $overrides = []): ResponseInterface public function update(array $overrides = []): ResponseInterface
{ {

View file

@ -14,11 +14,11 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
* @param string $path * @param string $path
* @return \stdClass * @return \stdClass
* *
* @throws \GuzzleHttp\Exception\RequestException * @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function getFileStat(string $path): stdClass public function getFileStat(string $path): stdClass
{ {
$file = pathinfo($path); $file = str_replace('\\', '/', pathinfo($path));
$file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/'; $file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/';
$response = $this->getHttpClient()->request('GET', sprintf( $response = $this->getHttpClient()->request('GET', sprintf(
@ -35,11 +35,11 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
* @param string $path * @param string $path
* @return string * @return string
* *
* @throws \GuzzleHttp\Exception\RequestException * @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function getContent(string $path): string public function getContent(string $path): string
{ {
$file = pathinfo($path); $file = str_replace('\\', '/', pathinfo($path));
$file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/'; $file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/';
$response = $this->getHttpClient()->request('GET', sprintf( $response = $this->getHttpClient()->request('GET', sprintf(
@ -57,11 +57,11 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
* @param string $content * @param string $content
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* *
* @throws \GuzzleHttp\Exception\RequestException * @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function putContent(string $path, string $content): ResponseInterface public function putContent(string $path, string $content): ResponseInterface
{ {
$file = pathinfo($path); $file = str_replace('\\', '/', pathinfo($path));
$file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/'; $file['dirname'] = in_array($file['dirname'], ['.', './', '/']) ? null : trim($file['dirname'], '/') . '/';
return $this->getHttpClient()->request('POST', 'server/file/save', [ return $this->getHttpClient()->request('POST', 'server/file/save', [
@ -78,7 +78,7 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
* @param string $path * @param string $path
* @return array * @return array
* *
* @throws \GuzzleHttp\Exception\RequestException * @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function getDirectory(string $path): array public function getDirectory(string $path): array
{ {
@ -100,7 +100,7 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
array_push($files, [ array_push($files, [
'entry' => $value->name, 'entry' => $value->name,
'directory' => trim($path, '/'), 'directory' => trim($path, '/'),
'extension' => pathinfo($value->name, PATHINFO_EXTENSION), 'extension' => str_replace('\\', '/', pathinfo($value->name, PATHINFO_EXTENSION)),
'size' => human_readable($value->size), 'size' => human_readable($value->size),
'date' => strtotime($value->modified), 'date' => strtotime($value->modified),
'mime' => $value->mime, 'mime' => $value->mime,

View file

@ -14,7 +14,8 @@ class PowerRepository extends BaseRepository implements PowerRepositoryInterface
* @param string $signal * @param string $signal
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* *
* @throws \Pterodactyl\Exceptions\Repository\Daemon\InvalidPowerSignalException * @throws InvalidPowerSignalException
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function sendSignal(string $signal): ResponseInterface public function sendSignal(string $signal): ResponseInterface
{ {

View file

@ -15,7 +15,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* @param array $overrides * @param array $overrides
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* *
* @throws \GuzzleHttp\Exception\RequestException * @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function create(array $structure, array $overrides = []): ResponseInterface public function create(array $structure, array $overrides = []): ResponseInterface
{ {
@ -33,6 +33,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* *
* @param array $data * @param array $data
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function update(array $data): ResponseInterface public function update(array $data): ResponseInterface
{ {
@ -46,6 +47,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* *
* @param array|null $data * @param array|null $data
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function reinstall(array $data = null): ResponseInterface public function reinstall(array $data = null): ResponseInterface
{ {
@ -58,6 +60,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Mark a server as needing a container rebuild the next time the server is booted. * Mark a server as needing a container rebuild the next time the server is booted.
* *
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function rebuild(): ResponseInterface public function rebuild(): ResponseInterface
{ {
@ -68,6 +71,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Suspend a server on the daemon. * Suspend a server on the daemon.
* *
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function suspend(): ResponseInterface public function suspend(): ResponseInterface
{ {
@ -78,6 +82,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Un-suspend a server on the daemon. * Un-suspend a server on the daemon.
* *
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function unsuspend(): ResponseInterface public function unsuspend(): ResponseInterface
{ {
@ -88,6 +93,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Delete a server on the daemon. * Delete a server on the daemon.
* *
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function delete(): ResponseInterface public function delete(): ResponseInterface
{ {
@ -95,9 +101,10 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
} }
/** /**
* Return detials on a specific server. * Return details on a specific server.
* *
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function details(): ResponseInterface public function details(): ResponseInterface
{ {
@ -110,7 +117,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* @param string|array $key * @param string|array $key
* @return \Psr\Http\Message\ResponseInterface * @return \Psr\Http\Message\ResponseInterface
* *
* @throws \GuzzleHttp\Exception\RequestException * @throws \GuzzleHttp\Exception\GuzzleException
*/ */
public function revokeAccessKey($key): ResponseInterface public function revokeAccessKey($key): ResponseInterface
{ {

View file

@ -97,7 +97,7 @@ class AllocationRepository extends EloquentRepository implements AllocationRepos
} }
/** /**
* Return a concated result set of node ips that already have at least one * Return a concatenated result set of node ips that already have at least one
* server assigned to that IP. This allows for filtering out sets for * server assigned to that IP. This allows for filtering out sets for
* dedicated allocation IPs. * dedicated allocation IPs.
* *

View file

@ -59,7 +59,7 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
} }
/** /**
* Return the connection to execute statements aganist. * Return the connection to execute statements against.
* *
* @return string * @return string
*/ */

View file

@ -92,7 +92,7 @@ class EggRepository extends EloquentRepository implements EggRepositoryInterface
* @param int $service * @param int $service
* @return bool * @return bool
*/ */
public function isCopiableScript(int $copyFromId, int $service): bool public function isCopyableScript(int $copyFromId, int $service): bool
{ {
return $this->getBuilder()->whereNull('copy_script_from') return $this->getBuilder()->whereNull('copy_script_from')
->where('id', '=', $copyFromId) ->where('id', '=', $copyFromId)

View file

@ -265,7 +265,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
} }
/** /**
* Return all of the servers that should have a power action performed aganist them. * Return all of the servers that should have a power action performed against them.
* *
* @param int[] $servers * @param int[] $servers
* @param int[] $nodes * @param int[] $nodes

View file

@ -37,10 +37,10 @@ class UserRepository extends EloquentRepository implements UserRepositoryInterfa
/** /**
* Return all matching models for a user in a format that can be used for dropdowns. * Return all matching models for a user in a format that can be used for dropdowns.
* *
* @param string $query * @param string|null $query
* @return \Illuminate\Support\Collection * @return \Illuminate\Support\Collection
*/ */
public function filterUsersByQuery(string $query): Collection public function filterUsersByQuery(?string $query): Collection
{ {
$this->setColumns([ $this->setColumns([
'id', 'email', 'username', 'name_first', 'name_last', 'id', 'email', 'username', 'name_first', 'name_last',

View file

@ -37,7 +37,7 @@ abstract class Repository implements RepositoryInterface
{ {
$this->app = $application; $this->app = $application;
$this->initalizeModel($this->model()); $this->initializeModel($this->model());
} }
/** /**
@ -103,7 +103,7 @@ abstract class Repository implements RepositoryInterface
} }
/** /**
* Set wether or not the repository should return a fresh model * Set whether or not the repository should return a fresh model
* when changes are committed. * when changes are committed.
* *
* @param bool $fresh * @param bool $fresh
@ -123,7 +123,7 @@ abstract class Repository implements RepositoryInterface
* @param array $model * @param array $model
* @return mixed * @return mixed
*/ */
protected function initalizeModel(...$model) protected function initializeModel(...$model)
{ {
switch (count($model)) { switch (count($model)) {
case 1: case 1:
@ -131,7 +131,7 @@ abstract class Repository implements RepositoryInterface
case 2: case 2:
return $this->model = call_user_func([$this->app->make($model[0]), $model[1]]); return $this->model = call_user_func([$this->app->make($model[0]), $model[1]]);
default: default:
throw new InvalidArgumentException('Model must be a FQCN or an array with a count of two.'); throw new InvalidArgumentException('Model must be a FQDN or an array with a count of two.');
} }
} }
} }

View file

@ -9,9 +9,9 @@ class AdminAcl
{ {
/** /**
* Resource permission columns in the api_keys table begin * Resource permission columns in the api_keys table begin
* with this identifer. * with this identifier.
*/ */
const COLUMN_IDENTIFER = 'r_'; const COLUMN_IDENTIFIER = 'r_';
/** /**
* The different types of permissions available for API keys. This * The different types of permissions available for API keys. This
@ -63,13 +63,14 @@ class AdminAcl
*/ */
public static function check(ApiKey $key, string $resource, int $action = self::READ) public static function check(ApiKey $key, string $resource, int $action = self::READ)
{ {
return self::can(data_get($key, self::COLUMN_IDENTIFER . $resource, self::NONE), $action); return self::can(data_get($key, self::COLUMN_IDENTIFIER . $resource, self::NONE), $action);
} }
/** /**
* Return a list of all resource constants defined in this ACL. * Return a list of all resource constants defined in this ACL.
* *
* @return array * @return array
* @throws \ReflectionException
*/ */
public static function getResourceList(): array public static function getResourceList(): array
{ {

View file

@ -51,7 +51,7 @@ class KeyCreationService
/** /**
* Create a new API key for the Panel using the permissions passed in the data request. * Create a new API key for the Panel using the permissions passed in the data request.
* This will automatically generate an identifer and an encrypted token that are * This will automatically generate an identifier and an encrypted token that are
* stored in the database. * stored in the database.
* *
* @param array $data * @param array $data

View file

@ -24,9 +24,9 @@
namespace Pterodactyl\Services\DaemonKeys; namespace Pterodactyl\Services\DaemonKeys;
use Illuminate\Log\Writer;
use Webmozart\Assert\Assert; use Webmozart\Assert\Assert;
use Pterodactyl\Models\Server; use Pterodactyl\Models\Server;
use Psr\Log\LoggerInterface as Writer;
use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\RequestException;
use Illuminate\Database\ConnectionInterface; use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Exceptions\DisplayException;
@ -57,7 +57,7 @@ class DaemonKeyDeletionService
protected $serverRepository; protected $serverRepository;
/** /**
* @var \Illuminate\Log\Writer * @var \Psr\Log\LoggerInterface
*/ */
protected $writer; protected $writer;
@ -68,7 +68,7 @@ class DaemonKeyDeletionService
* @param \Pterodactyl\Contracts\Repository\DaemonKeyRepositoryInterface $repository * @param \Pterodactyl\Contracts\Repository\DaemonKeyRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonRepository * @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonRepository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $serverRepository * @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $serverRepository
* @param \Illuminate\Log\Writer $writer * @param \Psr\Log\LoggerInterface $writer
*/ */
public function __construct( public function __construct(
ConnectionInterface $connection, ConnectionInterface $connection,

View file

@ -88,7 +88,7 @@ class FindViableNodesService
* attempt to find all nodes in the defined locations that meet the disk and * attempt to find all nodes in the defined locations that meet the disk and
* memory availability requirements. Any nodes not meeting those requirements * memory availability requirements. Any nodes not meeting those requirements
* are tossed out, as are any nodes marked as non-public, meaning automatic * are tossed out, as are any nodes marked as non-public, meaning automatic
* deployments should not be done aganist them. * deployments should not be done against them.
* *
* @return int[] * @return int[]
* @throws \Pterodactyl\Exceptions\Service\Deployment\NoViableNodeException * @throws \Pterodactyl\Exceptions\Service\Deployment\NoViableNodeException

View file

@ -15,7 +15,7 @@ use Pterodactyl\Contracts\Repository\EggRepositoryInterface;
use Illuminate\Contracts\Config\Repository as ConfigRepository; use Illuminate\Contracts\Config\Repository as ConfigRepository;
use Pterodactyl\Exceptions\Service\Egg\NoParentConfigurationFoundException; use Pterodactyl\Exceptions\Service\Egg\NoParentConfigurationFoundException;
// When a mommy and a daddy pterodactyl really like eachother... // When a mommy and a daddy pterodactyl really like each other...
class EggCreationService class EggCreationService
{ {
/** /**

View file

@ -47,7 +47,7 @@ class InstallScriptService
} }
if (! is_null(array_get($data, 'copy_script_from'))) { if (! is_null(array_get($data, 'copy_script_from'))) {
if (! $this->repository->isCopiableScript(array_get($data, 'copy_script_from'), $egg->nest_id)) { if (! $this->repository->isCopyableScript(array_get($data, 'copy_script_from'), $egg->nest_id)) {
throw new InvalidCopyFromException(trans('exceptions.nest.egg.invalid_copy_id')); throw new InvalidCopyFromException(trans('exceptions.nest.egg.invalid_copy_id'));
} }
} }

View file

@ -63,7 +63,7 @@ class ProcessScheduleService
{ {
$this->repository->loadTasks($schedule); $this->repository->loadTasks($schedule);
$formattedCron = sprintf('%s %s %s * %s *', $formattedCron = sprintf('%s %s %s * %s',
$schedule->cron_minute, $schedule->cron_minute,
$schedule->cron_hour, $schedule->cron_hour,
$schedule->cron_day_of_month, $schedule->cron_day_of_month,

View file

@ -86,7 +86,7 @@ class ScheduleCreationService
*/ */
private function getCronTimestamp(array $data) private function getCronTimestamp(array $data)
{ {
$formattedCron = sprintf('%s %s %s * %s *', $formattedCron = sprintf('%s %s %s * %s',
array_get($data, 'cron_minute', '*'), array_get($data, 'cron_minute', '*'),
array_get($data, 'cron_hour', '*'), array_get($data, 'cron_hour', '*'),
array_get($data, 'cron_day_of_month', '*'), array_get($data, 'cron_day_of_month', '*'),

View file

@ -98,7 +98,7 @@ class ScheduleUpdateService
*/ */
private function getCronTimestamp(array $data) private function getCronTimestamp(array $data)
{ {
$formattedCron = sprintf('%s %s %s * %s *', $formattedCron = sprintf('%s %s %s * %s',
array_get($data, 'cron_minute', '*'), array_get($data, 'cron_minute', '*'),
array_get($data, 'cron_hour', '*'), array_get($data, 'cron_hour', '*'),
array_get($data, 'cron_day_of_month', '*'), array_get($data, 'cron_day_of_month', '*'),

View file

@ -9,8 +9,7 @@
namespace Pterodactyl\Services\Servers; namespace Pterodactyl\Services\Servers;
use Illuminate\Log\Writer; use Psr\Log\LoggerInterface as Writer;
use Pterodactyl\Models\Server;
use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\RequestException;
use Illuminate\Database\ConnectionInterface; use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Services\Databases\DatabaseManagementService; use Pterodactyl\Services\Databases\DatabaseManagementService;
@ -52,7 +51,7 @@ class ServerDeletionService
protected $repository; protected $repository;
/** /**
* @var \Illuminate\Log\Writer * @var \Psr\Log\LoggerInterface
*/ */
protected $writer; protected $writer;
@ -64,7 +63,7 @@ class ServerDeletionService
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository * @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService * @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository * @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Illuminate\Log\Writer $writer * @param \Psr\Log\LoggerInterface $writer
*/ */
public function __construct( public function __construct(
ConnectionInterface $connection, ConnectionInterface $connection,

View file

@ -24,7 +24,7 @@ class StartupCommandViewService
/** /**
* Generate a startup command for a server and return all of the user-viewable variables * Generate a startup command for a server and return all of the user-viewable variables
* as well as thier assigned values. * as well as their assigned values.
* *
* @param int $server * @param int $server
* @return \Illuminate\Support\Collection * @return \Illuminate\Support\Collection

View file

@ -9,8 +9,8 @@
namespace Pterodactyl\Services\Servers; namespace Pterodactyl\Services\Servers;
use Illuminate\Log\Writer;
use Pterodactyl\Models\Server; use Pterodactyl\Models\Server;
use Psr\Log\LoggerInterface as Writer;
use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\RequestException;
use Illuminate\Database\ConnectionInterface; use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Exceptions\DisplayException;
@ -38,7 +38,7 @@ class SuspensionService
protected $repository; protected $repository;
/** /**
* @var \Illuminate\Log\Writer * @var \Psr\Log\LoggerInterface
*/ */
protected $writer; protected $writer;
@ -48,7 +48,7 @@ class SuspensionService
* @param \Illuminate\Database\ConnectionInterface $database * @param \Illuminate\Database\ConnectionInterface $database
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository * @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository * @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Illuminate\Log\Writer $writer * @param \Psr\Log\LoggerInterface $writer
*/ */
public function __construct( public function __construct(
ConnectionInterface $database, ConnectionInterface $database,

View file

@ -63,7 +63,7 @@ class VariableValidatorService
} }
/** /**
* Validate all of the passed data aganist the given service option variables. * Validate all of the passed data against the given service option variables.
* *
* @param int $egg * @param int $egg
* @param array $fields * @param array $fields

View file

@ -52,7 +52,7 @@ class AuthenticateUsingPasswordService
} }
/** /**
* Attempt to authenticate a provded username and password and determine if they * Attempt to authenticate a provided username and password and determine if they
* have permission to access a given server. This function does not account for * have permission to access a given server. This function does not account for
* subusers currently. Only administrators and server owners can login to access * subusers currently. Only administrators and server owners can login to access
* their files at this time. * their files at this time.

View file

@ -10,7 +10,6 @@
namespace Pterodactyl\Services\Subusers; namespace Pterodactyl\Services\Subusers;
use Pterodactyl\Models\Server; use Pterodactyl\Models\Server;
use Pterodactyl\Rules\Username;
use Illuminate\Database\ConnectionInterface; use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Services\Users\UserCreationService; use Pterodactyl\Services\Users\UserCreationService;
use Pterodactyl\Contracts\Repository\UserRepositoryInterface; use Pterodactyl\Contracts\Repository\UserRepositoryInterface;

View file

@ -47,7 +47,7 @@ class UserUpdateService
/** /**
* Update the user model instance. If the user has been removed as an administrator * Update the user model instance. If the user has been removed as an administrator
* revoke all of the authentication tokens that have beenn assigned to their account. * revoke all of the authentication tokens that have been assigned to their account.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @param array $data * @param array $data

View file

@ -46,6 +46,7 @@ class AllocationTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Allocation $allocation * @param \Pterodactyl\Models\Allocation $allocation
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeNode(Allocation $allocation) public function includeNode(Allocation $allocation)
{ {
@ -65,6 +66,7 @@ class AllocationTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Allocation $allocation * @param \Pterodactyl\Models\Allocation $allocation
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeServer(Allocation $allocation) public function includeServer(Allocation $allocation)
{ {

View file

@ -55,6 +55,7 @@ class DatabaseHostTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\DatabaseHost $model * @param \Pterodactyl\Models\DatabaseHost $model
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeDatabases(DatabaseHost $model) public function includeDatabases(DatabaseHost $model)
{ {

View file

@ -70,6 +70,7 @@ class EggTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Egg $model * @param \Pterodactyl\Models\Egg $model
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeNest(Egg $model) public function includeNest(Egg $model)
{ {
@ -87,6 +88,7 @@ class EggTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Egg $model * @param \Pterodactyl\Models\Egg $model
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeServers(Egg $model) public function includeServers(Egg $model)
{ {
@ -154,6 +156,7 @@ class EggTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Egg $model * @param \Pterodactyl\Models\Egg $model
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeVariables(Egg $model) public function includeVariables(Egg $model)
{ {

View file

@ -52,6 +52,7 @@ class NodeTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Node $node * @param \Pterodactyl\Models\Node $node
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeAllocations(Node $node) public function includeAllocations(Node $node)
{ {
@ -71,6 +72,7 @@ class NodeTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Node $node * @param \Pterodactyl\Models\Node $node
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeLocation(Node $node) public function includeLocation(Node $node)
{ {
@ -90,6 +92,7 @@ class NodeTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Node $node * @param \Pterodactyl\Models\Node $node
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeServers(Node $node) public function includeServers(Node $node)
{ {

View file

@ -85,6 +85,7 @@ class ServerDatabaseTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\Database $model * @param \Pterodactyl\Models\Database $model
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeHost(Database $model) public function includeHost(Database $model)
{ {

View file

@ -40,6 +40,7 @@ class ServerVariableTransformer extends BaseTransformer
* *
* @param \Pterodactyl\Models\ServerVariable $variable * @param \Pterodactyl\Models\ServerVariable $variable
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource * @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/ */
public function includeParent(ServerVariable $variable) public function includeParent(ServerVariable $variable)
{ {

View file

@ -10,14 +10,14 @@ $app = require __DIR__ . '/app.php';
/** @var \Pterodactyl\Console\Kernel $kernel */ /** @var \Pterodactyl\Console\Kernel $kernel */
$kernel = $app->make(Kernel::class); $kernel = $app->make(Kernel::class);
/** /*
* Bootstrap the kernel and prepare application for testing. * Bootstrap the kernel and prepare application for testing.
*/ */
$kernel->bootstrap(); $kernel->bootstrap();
$output = new ConsoleOutput; $output = new ConsoleOutput;
/** /*
* Perform database migrations and reseeding before continuing with * Perform database migrations and reseeding before continuing with
* running the tests. * running the tests.
*/ */

View file

@ -19,24 +19,23 @@
"aws/aws-sdk-php": "^3.48", "aws/aws-sdk-php": "^3.48",
"cakephp/chronos": "^1.1", "cakephp/chronos": "^1.1",
"doctrine/dbal": "^2.5", "doctrine/dbal": "^2.5",
"fideloper/proxy": "^3.3", "fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.3", "guzzlehttp/guzzle": "^6.3",
"hashids/hashids": "^2.0", "hashids/hashids": "^2.0",
"igaster/laravel-theme": "^2.0.6", "igaster/laravel-theme": "^2.0.6",
"laracasts/utilities": "^3.0", "laracasts/utilities": "^3.0",
"laravel/framework": "5.5.*", "laravel/framework": "5.6.*",
"laravel/tinker": "^1.0", "laravel/tinker": "^1.0",
"lord/laroute": "^2.4", "lord/laroute": "^2.4",
"matriphe/iso-639": "^1.2", "matriphe/iso-639": "^1.2",
"mtdowling/cron-expression": "^1.2",
"nesbot/carbon": "^1.22", "nesbot/carbon": "^1.22",
"pragmarx/google2fa": "^2.0", "pragmarx/google2fa": "^2.0",
"predis/predis": "^1.1", "predis/predis": "^1.1",
"prologue/alerts": "^0.4", "prologue/alerts": "^0.4",
"ramsey/uuid": "^3.7", "ramsey/uuid": "^3.7",
"s1lentium/iptools": "^1.1", "s1lentium/iptools": "^1.1",
"sofa/eloquence-base": "v5.5", "sofa/eloquence-base": "v5.6",
"sofa/eloquence-validable": "v5.5", "sofa/eloquence-validable": "v5.6",
"spatie/laravel-fractal": "^5.3", "spatie/laravel-fractal": "^5.3",
"webmozart/assert": "^1.2", "webmozart/assert": "^1.2",
"znck/belongs-to-through": "^2.3" "znck/belongs-to-through": "^2.3"
@ -44,14 +43,15 @@
"require-dev": { "require-dev": {
"barryvdh/laravel-debugbar": "^3.1", "barryvdh/laravel-debugbar": "^3.1",
"barryvdh/laravel-ide-helper": "^2.4", "barryvdh/laravel-ide-helper": "^2.4",
"codedungeon/phpunit-result-printer": "^0.6.0", "codedungeon/phpunit-result-printer": "^0.17.1",
"filp/whoops": "^2.1", "filp/whoops": "^2.1",
"friendsofphp/php-cs-fixer": "^2.8.0", "friendsofphp/php-cs-fixer": "^2.11.1",
"fzaninotto/faker": "^1.6", "fzaninotto/faker": "^1.6",
"martinlindhe/laravel-vue-i18n-generator": "^0.1.28", "martinlindhe/laravel-vue-i18n-generator": "^0.1.28",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"php-mock/php-mock-phpunit": "^2.0", "nunomaduro/collision": "^2.0",
"phpunit/phpunit": "~6.4.0", "php-mock/php-mock-phpunit": "^2.1",
"phpunit/phpunit": "~7.0",
"tightenco/ziggy": "^0.5.0" "tightenco/ziggy": "^0.5.0"
}, },
"autoload": { "autoload": {

View file

@ -116,23 +116,6 @@ return [
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
*/
'log' => env('APP_LOG', 'daily'),
'log_level' => env('APP_LOG_LEVEL', 'info'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Exception Reporter Configuration | Exception Reporter Configuration

View file

@ -98,14 +98,14 @@ return [
'host' => env('REDIS_HOST', 'localhost'), 'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DATBASE', 0), 'database' => env('REDIS_DATABASE', 0),
], ],
'sessions' => [ 'sessions' => [
'host' => env('REDIS_HOST', 'localhost'), 'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DATBASE_SESSIONS', 1), 'database' => env('REDIS_DATABASE_SESSIONS', 1),
], ],
], ],
]; ];

50
config/hashing.php Normal file
View file

@ -0,0 +1,50 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],
];

81
config/logging.php Normal file
View file

@ -0,0 +1,81 @@
<?php
use Monolog\Handler\StreamHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'daily'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 7,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],
'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],
],
];

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