Inital upgrade to 5.5

This simply updates dependencies and gets all of the providers and config files updated based on what  the laravel/laravel currently ships with
This commit is contained in:
Dane Everitt 2017-12-16 12:20:09 -06:00
parent f9df463d32
commit 0dcf2aaed6
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
17 changed files with 936 additions and 679 deletions

View File

@ -15,6 +15,8 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
### Changed ### Changed
* Revoking the administrative status for an admin will revoke all authentication tokens currently assigned to their account. * Revoking the administrative status for an admin will revoke all authentication tokens currently assigned to their account.
* Updated core framework to Laravel 5.5. This includes many dependency updates.
* Certain AWS specific environment keys were changed, this should have minimal impact on users unless you specifically enabled AWS specific features. The renames are: `AWS_KEY -> AWS_ACCESS_KEY_ID`, `AWS_SECRET -> AWS_SECRET_ACCESS_KEY`, `AWS_REGION -> AWS_DEFAULT_REGION`
### Added ### Added
* Added star indicators to user listing in Admin CP to indicate users who are set as a root admin. * Added star indicators to user listing in Admin CP to indicate users who are set as a root admin.

View File

@ -3,41 +3,17 @@
namespace Pterodactyl\Console; namespace Pterodactyl\Console;
use Illuminate\Console\Scheduling\Schedule; use Illuminate\Console\Scheduling\Schedule;
use Pterodactyl\Console\Commands\InfoCommand;
use Pterodactyl\Console\Commands\User\MakeUserCommand;
use Pterodactyl\Console\Commands\User\DeleteUserCommand;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Pterodactyl\Console\Commands\Server\RebuildServerCommand;
use Pterodactyl\Console\Commands\Location\MakeLocationCommand;
use Pterodactyl\Console\Commands\User\DisableTwoFactorCommand;
use Pterodactyl\Console\Commands\Environment\AppSettingsCommand;
use Pterodactyl\Console\Commands\Location\DeleteLocationCommand;
use Pterodactyl\Console\Commands\Schedule\ProcessRunnableCommand;
use Pterodactyl\Console\Commands\Environment\EmailSettingsCommand;
use Pterodactyl\Console\Commands\Environment\DatabaseSettingsCommand;
use Pterodactyl\Console\Commands\Maintenance\CleanServiceBackupFilesCommand;
class Kernel extends ConsoleKernel class Kernel extends ConsoleKernel
{ {
/** /**
* The Artisan commands provided by your application. * Register the commands for the application.
*
* @var array
*/ */
protected $commands = [ protected function commands()
AppSettingsCommand::class, {
CleanServiceBackupFilesCommand::class, $this->load(__DIR__ . '/Commands');
DatabaseSettingsCommand::class, }
DeleteLocationCommand::class,
DeleteUserCommand::class,
DisableTwoFactorCommand::class,
EmailSettingsCommand::class,
InfoCommand::class,
MakeLocationCommand::class,
MakeUserCommand::class,
ProcessRunnableCommand::class,
RebuildServerCommand::class,
];
/** /**
* Define the application's command schedule. * Define the application's command schedule.

View File

@ -2,10 +2,10 @@
namespace Pterodactyl\Http; namespace Pterodactyl\Http;
use Fideloper\Proxy\TrustProxies;
use Illuminate\Auth\Middleware\Authorize; use Illuminate\Auth\Middleware\Authorize;
use Illuminate\Auth\Middleware\Authenticate; use Illuminate\Auth\Middleware\Authenticate;
use Pterodactyl\Http\Middleware\TrimStrings; use Pterodactyl\Http\Middleware\TrimStrings;
use Pterodactyl\Http\Middleware\TrustProxies;
use Illuminate\Session\Middleware\StartSession; use Illuminate\Session\Middleware\StartSession;
use Pterodactyl\Http\Middleware\EncryptCookies; use Pterodactyl\Http\Middleware\EncryptCookies;
use Pterodactyl\Http\Middleware\VerifyCsrfToken; use Pterodactyl\Http\Middleware\VerifyCsrfToken;
@ -23,6 +23,7 @@ use Pterodactyl\Http\Middleware\RedirectIfAuthenticated;
use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth; use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
use Pterodactyl\Http\Middleware\API\AuthenticateIPAccess; use Pterodactyl\Http\Middleware\API\AuthenticateIPAccess;
use Pterodactyl\Http\Middleware\Daemon\DaemonAuthenticate; use Pterodactyl\Http\Middleware\Daemon\DaemonAuthenticate;
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse; use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Pterodactyl\Http\Middleware\API\HasPermissionToResource; use Pterodactyl\Http\Middleware\API\HasPermissionToResource;
use Pterodactyl\Http\Middleware\Server\AuthenticateAsSubuser; use Pterodactyl\Http\Middleware\Server\AuthenticateAsSubuser;
@ -31,6 +32,7 @@ use Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication;
use Pterodactyl\Http\Middleware\Server\DatabaseBelongsToServer; use Pterodactyl\Http\Middleware\Server\DatabaseBelongsToServer;
use Pterodactyl\Http\Middleware\Server\ScheduleBelongsToServer; use Pterodactyl\Http\Middleware\Server\ScheduleBelongsToServer;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode; use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
use Pterodactyl\Http\Middleware\DaemonAuthenticate as OldDaemonAuthenticate; use Pterodactyl\Http\Middleware\DaemonAuthenticate as OldDaemonAuthenticate;
class Kernel extends HttpKernel class Kernel extends HttpKernel
@ -42,9 +44,9 @@ class Kernel extends HttpKernel
*/ */
protected $middleware = [ protected $middleware = [
CheckForMaintenanceMode::class, CheckForMaintenanceMode::class,
EncryptCookies::class, ValidatePostSize::class,
AddQueuedCookiesToResponse::class,
TrimStrings::class, TrimStrings::class,
ConvertEmptyStringsToNull::class,
TrustProxies::class, TrustProxies::class,
]; ];

View File

@ -0,0 +1,29 @@
<?php
namespace Pterodactyl\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
*/
protected $proxies;
/**
* The current proxy header mappings.
*
* @var array
*/
protected $headers = [
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

@ -12,8 +12,6 @@ use Illuminate\Support\ServiceProvider;
use Pterodactyl\Observers\UserObserver; use Pterodactyl\Observers\UserObserver;
use Pterodactyl\Observers\ServerObserver; use Pterodactyl\Observers\ServerObserver;
use Pterodactyl\Observers\SubuserObserver; use Pterodactyl\Observers\SubuserObserver;
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {
@ -32,17 +30,6 @@ class AppServiceProvider extends ServiceProvider
View::share('appIsGit', $this->versionData()['is_git'] ?? false); View::share('appIsGit', $this->versionData()['is_git'] ?? false);
} }
/**
* Register any application services.
*/
public function register()
{
if ($this->app->environment() !== 'production') {
$this->app->register(DebugbarServiceProvider::class);
$this->app->register(IdeHelperServiceProvider::class);
}
}
/** /**
* Return version information for the footer. * Return version information for the footer.
* *

View File

@ -12,12 +12,4 @@ class EventServiceProvider extends ServiceProvider
* @var array * @var array
*/ */
protected $listen = []; protected $listen = [];
/**
* Register any other events for your application.
*/
public function boot()
{
parent::boot();
}
} }

View File

@ -15,43 +15,40 @@
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-pdo_mysql": "*", "ext-pdo_mysql": "*",
"ext-zip": "*", "ext-zip": "*",
"appstract/laravel-blade-directives": "^0.6.0", "appstract/laravel-blade-directives": "^0.7",
"aws/aws-sdk-php": "^3.29", "aws/aws-sdk-php": "^3.48",
"daneeveritt/login-notifications": "^1.0",
"doctrine/dbal": "^2.5", "doctrine/dbal": "^2.5",
"edvinaskrucas/settings": "^2.0",
"fideloper/proxy": "^3.3", "fideloper/proxy": "^3.3",
"guzzlehttp/guzzle": "~6.3.0", "guzzlehttp/guzzle": "^6.3",
"hashids/hashids": "^2.0", "hashids/hashids": "^2.0",
"igaster/laravel-theme": "^1.16", "igaster/laravel-theme": "^1.16",
"laracasts/utilities": "^3.0", "laracasts/utilities": "^3.0",
"laravel/framework": "5.4.27", "laravel/framework": "5.5.*",
"laravel/tinker": "1.0.1", "laravel/tinker": "^1.0",
"lord/laroute": "~2.4.5", "lord/laroute": "^2.4",
"matriphe/iso-639": "^1.2", "matriphe/iso-639": "^1.2",
"mtdowling/cron-expression": "^1.2", "mtdowling/cron-expression": "^1.2",
"nesbot/carbon": "^1.22", "nesbot/carbon": "^1.22",
"nicolaslopezj/searchable": "^1.9",
"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": "~5.4.1", "sofa/eloquence-base": "v5.5",
"spatie/laravel-fractal": "^4.0", "sofa/eloquence-validable": "v5.5",
"watson/validating": "^3.0", "spatie/laravel-fractal": "^5.3",
"webmozart/assert": "^1.2", "webmozart/assert": "^1.2",
"webpatser/laravel-uuid": "^2.0",
"znck/belongs-to-through": "^2.3" "znck/belongs-to-through": "^2.3"
}, },
"require-dev": { "require-dev": {
"barryvdh/laravel-debugbar": "^2.4", "barryvdh/laravel-debugbar": "^3.1",
"barryvdh/laravel-ide-helper": "^2.4", "barryvdh/laravel-ide-helper": "^2.4",
"filp/whoops": "^2.1",
"friendsofphp/php-cs-fixer": "^2.8.0", "friendsofphp/php-cs-fixer": "^2.8.0",
"fzaninotto/faker": "^1.6", "fzaninotto/faker": "^1.6",
"mockery/mockery": "^0.9", "mockery/mockery": "^1.0",
"php-mock/php-mock-phpunit": "^1.1", "php-mock/php-mock-phpunit": "^2.0",
"phpunit/phpunit": "^5.7" "phpunit/phpunit": "^6.5"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [
@ -70,13 +67,15 @@
} }
}, },
"scripts": { "scripts": {
"post-install-cmd": [ "post-root-package-install": [
"Illuminate\\Foundation\\ComposerScripts::postInstall", "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
"php artisan optimize"
], ],
"post-update-cmd": [ "post-create-project-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate", "@php artisan key:generate"
"php artisan optimize" ],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
] ]
}, },
"prefer-stable": true, "prefer-stable": true,

1333
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,15 @@
<?php <?php
return [ return [
'env' => env('APP_ENV', 'production'), /*
|--------------------------------------------------------------------------
| Application Version
|--------------------------------------------------------------------------
| This value is set when creating a Pterodactyl release. You should not
| change this value if you are not maintaining your own internal versions.
*/
'version' => env('APP_VERSION', 'canary'), 'version' => 'canary',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -15,8 +20,22 @@ return [
| framework needs to place the application's name in a notification or | framework needs to place the application's name in a notification or
| any other location as required by the application or its packages. | any other location as required by the application or its packages.
*/ */
'name' => env('APP_NAME', 'Pterodactyl'), 'name' => env('APP_NAME', 'Pterodactyl'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Debug Mode | Application Debug Mode
@ -93,7 +112,7 @@ return [
| |
*/ */
'key' => env('APP_KEY', 'SomeRandomString3232RandomString'), 'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
@ -112,7 +131,7 @@ return [
'log' => env('APP_LOG', 'daily'), 'log' => env('APP_LOG', 'daily'),
'log_level' => env('APP_LOG_LEVEL', 'debug'), 'log_level' => env('APP_LOG_LEVEL', 'info'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -141,6 +160,7 @@ return [
Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class, Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class,
@ -149,12 +169,6 @@ return [
Illuminate\Session\SessionServiceProvider::class, Illuminate\Session\SessionServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class, Illuminate\View\ViewServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
/*
* Package Service Providers...
*/
Laravel\Tinker\TinkerServiceProvider::class,
/* /*
* Application Service Providers... * Application Service Providers...
@ -175,12 +189,7 @@ return [
*/ */
igaster\laravelTheme\themeServiceProvider::class, igaster\laravelTheme\themeServiceProvider::class,
Prologue\Alerts\AlertsServiceProvider::class, Prologue\Alerts\AlertsServiceProvider::class,
Fideloper\Proxy\TrustedProxyServiceProvider::class,
Laracasts\Utilities\JavaScript\JavaScriptServiceProvider::class,
Lord\Laroute\LarouteServiceProvider::class, Lord\Laroute\LarouteServiceProvider::class,
Spatie\Fractal\FractalServiceProvider::class,
Sofa\Eloquence\ServiceProvider::class,
Appstract\BladeDirectives\BladeDirectivesServiceProvider::class,
], ],
/* /*
@ -205,17 +214,14 @@ return [
'Carbon' => Carbon\Carbon::class, 'Carbon' => Carbon\Carbon::class,
'Config' => Illuminate\Support\Facades\Config::class, 'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Cron' => Cron\CronExpression::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class, 'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class, 'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class, 'File' => Illuminate\Support\Facades\File::class,
'Fractal' => Spatie\Fractal\FractalFacade::class,
'Gate' => Illuminate\Support\Facades\Gate::class, 'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class, 'Hash' => Illuminate\Support\Facades\Hash::class,
'Input' => Illuminate\Support\Facades\Input::class, 'Input' => Illuminate\Support\Facades\Input::class,
'Inspiring' => Illuminate\Foundation\Inspiring::class,
'Javascript' => Laracasts\Utilities\JavaScript\JavaScriptFacade::class, 'Javascript' => Laracasts\Utilities\JavaScript\JavaScriptFacade::class,
'Lang' => Illuminate\Support\Facades\Lang::class, 'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class, 'Log' => Illuminate\Support\Facades\Log::class,
@ -233,7 +239,6 @@ return [
'Storage' => Illuminate\Support\Facades\Storage::class, 'Storage' => Illuminate\Support\Facades\Storage::class,
'Theme' => igaster\laravelTheme\Facades\Theme::class, 'Theme' => igaster\laravelTheme\Facades\Theme::class,
'URL' => Illuminate\Support\Facades\URL::class, 'URL' => Illuminate\Support\Facades\URL::class,
'Uuid' => Webpatser\Uuid\Uuid::class,
'Validator' => Illuminate\Support\Facades\Validator::class, 'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class, 'View' => Illuminate\Support\Facades\View::class,
], ],

View File

@ -10,6 +10,8 @@ return [
| using this caching library. This connection is used when another is | using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function. | not explicitly specified when executing a given caching function.
| |
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
*/ */
'default' => env('CACHE_DRIVER', 'file'), 'default' => env('CACHE_DRIVER', 'file'),
@ -39,6 +41,7 @@ return [
'table' => 'cache', 'table' => 'cache',
'connection' => null, 'connection' => null,
], ],
'file' => [ 'file' => [
'driver' => 'file', 'driver' => 'file',
'path' => storage_path('framework/cache/data'), 'path' => storage_path('framework/cache/data'),
@ -80,5 +83,5 @@ return [
| |
*/ */
'prefix' => 'pterodactyl', 'prefix' => env('CACHE_PREFIX', str_slug(env('APP_NAME', 'pterodactyl'), '_') . '_cache'),
]; ];

View File

@ -75,7 +75,7 @@ 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' => 0, 'database' => env('REDIS_DATBASE', 0),
], ],
], ],
]; ];

View File

@ -10,11 +10,9 @@ return [
| by the framework. A "local" driver, as well as a variety of cloud | by the framework. A "local" driver, as well as a variety of cloud
| based drivers are available for your choosing. Just store away! | based drivers are available for your choosing. Just store away!
| |
| Supported: "local", "ftp", "s3", "rackspace"
|
*/ */
'default' => 'local', 'default' => env('FILESYSTEM_DRIVER', 'local'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -27,7 +25,7 @@ return [
| |
*/ */
'cloud' => 's3', 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -56,9 +54,9 @@ return [
's3' => [ 's3' => [
'driver' => 's3', 'driver' => 's3',
'key' => env('AWS_KEY'), 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET'), 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_REGION'), 'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'), 'bucket' => env('AWS_BUCKET'),
], ],
], ],

View File

@ -28,7 +28,7 @@ return [
| |
*/ */
'lifetime' => 10080, 'lifetime' => env('SESSION_LIFETIME', 10080),
'expire_on_close' => false, 'expire_on_close' => false,
@ -121,7 +121,7 @@ return [
| |
*/ */
'cookie' => 'pterodactyl_session', 'cookie' => env('SESSION_COOKIE', str_slug(env('APP_NAME', 'pterodactyl'), '_') . '_session'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -174,4 +174,19 @@ return [
*/ */
'http_only' => true, 'http_only' => true,
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place.
|
| Supported: "lax", "strict"
|
*/
'same_site' => null,
]; ];

View File

@ -1,5 +1,7 @@
<?php <?php
use Faker\Generator as Faker;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Model Factories | Model Factories
@ -11,9 +13,7 @@
| |
*/ */
\Sofa\Eloquence\Model::unsetEventDispatcher(); $factory->define(Pterodactyl\Models\Server::class, function (Faker $faker) {
$factory->define(Pterodactyl\Models\Server::class, function (Faker\Generator $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'node_id' => $faker->randomNumber(), 'node_id' => $faker->randomNumber(),
@ -39,7 +39,7 @@ $factory->define(Pterodactyl\Models\Server::class, function (Faker\Generator $fa
]; ];
}); });
$factory->define(Pterodactyl\Models\User::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\User::class, function (Faker $faker) {
static $password; static $password;
return [ return [
@ -63,7 +63,7 @@ $factory->state(Pterodactyl\Models\User::class, 'admin', function () {
]; ];
}); });
$factory->define(Pterodactyl\Models\Location::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Location::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'short' => $faker->domainWord, 'short' => $faker->domainWord,
@ -71,7 +71,7 @@ $factory->define(Pterodactyl\Models\Location::class, function (Faker\Generator $
]; ];
}); });
$factory->define(Pterodactyl\Models\Node::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Node::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'uuid' => $faker->unique()->uuid, 'uuid' => $faker->unique()->uuid,
@ -92,7 +92,7 @@ $factory->define(Pterodactyl\Models\Node::class, function (Faker\Generator $fake
]; ];
}); });
$factory->define(Pterodactyl\Models\Nest::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Nest::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'uuid' => $faker->unique()->uuid, 'uuid' => $faker->unique()->uuid,
@ -102,7 +102,7 @@ $factory->define(Pterodactyl\Models\Nest::class, function (Faker\Generator $fake
]; ];
}); });
$factory->define(Pterodactyl\Models\Egg::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Egg::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'uuid' => $faker->unique()->uuid, 'uuid' => $faker->unique()->uuid,
@ -113,7 +113,7 @@ $factory->define(Pterodactyl\Models\Egg::class, function (Faker\Generator $faker
]; ];
}); });
$factory->define(Pterodactyl\Models\EggVariable::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\EggVariable::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'name' => $faker->firstName, 'name' => $faker->firstName,
@ -134,7 +134,7 @@ $factory->state(Pterodactyl\Models\EggVariable::class, 'editable', function () {
return ['user_editable' => 1]; return ['user_editable' => 1];
}); });
$factory->define(Pterodactyl\Models\Pack::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Pack::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'egg_id' => $faker->randomNumber(), 'egg_id' => $faker->randomNumber(),
@ -148,7 +148,7 @@ $factory->define(Pterodactyl\Models\Pack::class, function (Faker\Generator $fake
]; ];
}); });
$factory->define(Pterodactyl\Models\Subuser::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Subuser::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'user_id' => $faker->randomNumber(), 'user_id' => $faker->randomNumber(),
@ -156,7 +156,7 @@ $factory->define(Pterodactyl\Models\Subuser::class, function (Faker\Generator $f
]; ];
}); });
$factory->define(Pterodactyl\Models\Allocation::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Allocation::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'node_id' => $faker->randomNumber(), 'node_id' => $faker->randomNumber(),
@ -165,7 +165,7 @@ $factory->define(Pterodactyl\Models\Allocation::class, function (Faker\Generator
]; ];
}); });
$factory->define(Pterodactyl\Models\DatabaseHost::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\DatabaseHost::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'name' => $faker->colorName, 'name' => $faker->colorName,
@ -177,7 +177,7 @@ $factory->define(Pterodactyl\Models\DatabaseHost::class, function (Faker\Generat
]; ];
}); });
$factory->define(Pterodactyl\Models\Database::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Database::class, function (Faker $faker) {
static $password; static $password;
return [ return [
@ -192,7 +192,7 @@ $factory->define(Pterodactyl\Models\Database::class, function (Faker\Generator $
]; ];
}); });
$factory->define(Pterodactyl\Models\Schedule::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Schedule::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'server_id' => $faker->randomNumber(), 'server_id' => $faker->randomNumber(),
@ -200,7 +200,7 @@ $factory->define(Pterodactyl\Models\Schedule::class, function (Faker\Generator $
]; ];
}); });
$factory->define(Pterodactyl\Models\Task::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\Task::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'schedule_id' => $faker->randomNumber(), 'schedule_id' => $faker->randomNumber(),
@ -212,7 +212,7 @@ $factory->define(Pterodactyl\Models\Task::class, function (Faker\Generator $fake
]; ];
}); });
$factory->define(Pterodactyl\Models\DaemonKey::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\DaemonKey::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'server_id' => $faker->randomNumber(), 'server_id' => $faker->randomNumber(),
@ -222,7 +222,7 @@ $factory->define(Pterodactyl\Models\DaemonKey::class, function (Faker\Generator
]; ];
}); });
$factory->define(Pterodactyl\Models\APIKey::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\APIKey::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'user_id' => $faker->randomNumber(), 'user_id' => $faker->randomNumber(),
@ -233,7 +233,7 @@ $factory->define(Pterodactyl\Models\APIKey::class, function (Faker\Generator $fa
]; ];
}); });
$factory->define(Pterodactyl\Models\APIPermission::class, function (Faker\Generator $faker) { $factory->define(Pterodactyl\Models\APIPermission::class, function (Faker $faker) {
return [ return [
'id' => $faker->unique()->randomNumber(), 'id' => $faker->unique()->randomNumber(),
'key_id' => $faker->randomNumber(), 'key_id' => $faker->randomNumber(),

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false" <phpunit backupGlobals="false"
backupStaticAttributes="false" backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php" bootstrap="vendor/autoload.php"
colors="true" colors="true"
convertErrorsToExceptions="true" convertErrorsToExceptions="true"
convertNoticesToExceptions="true" convertNoticesToExceptions="true"

View File

@ -1,17 +1,18 @@
<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
<IfModule mod_negotiation.c> <IfModule mod_negotiation.c>
Options -MultiViews Options -MultiViews -Indexes
</IfModule> </IfModule>
RewriteEngine On RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder... # Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301] RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Prevent stripping authorization headers
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
# Handle Front Controller... # Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d

View File

@ -3,8 +3,9 @@
/** /**
* Laravel - A PHP Framework For Web Artisans. * Laravel - A PHP Framework For Web Artisans.
* *
* @author Taylor Otwell <taylorotwell@gmail.com> * @author Taylor Otwell <taylor@laravel.com>
*/ */
define('LARAVEL_START', microtime(true));
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -14,11 +15,11 @@
| Composer provides a convenient, automatically generated class loader for | Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it | our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual | into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax. | loading any of our classes later on. It feels great to relax.
| |
*/ */
require __DIR__ . '/../bootstrap/autoload.php'; require __DIR__ . '/../vendor/autoload.php';
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------