Merge branch 'release/v0.7.1'
This commit is contained in:
commit
e4425eeefa
19 changed files with 246 additions and 109 deletions
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -3,6 +3,20 @@ This file is a running track of new features and fixes to each version of the pa
|
|||
|
||||
This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||
|
||||
## v0.7.1 (Derelict Dermodactylus)
|
||||
### 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 trying to perform actions aganist a User model due to a validator that could not be cast to a string correctly.
|
||||
* Allow FQDNs in database host creation UI correctly.
|
||||
* Fixes database naming scheme using `d###_` rather than `s###_` when creating server databases.
|
||||
* Fix exception thrown when attempting to update an existing database host.
|
||||
|
||||
### Changed
|
||||
* Adjusted exception handler behavior to log more stack information for PDO exceptions while not exposing credentials.
|
||||
|
||||
### Added
|
||||
* Very basic cache busting until asset management can be changed to make use of better systems.
|
||||
|
||||
## v0.7.0 (Derelict Dermodactylus)
|
||||
### Fixed
|
||||
* `[rc.2]` — Fixes bad API behavior on `/user` routes.
|
||||
|
|
|
@ -32,6 +32,16 @@ class Handler extends ExceptionHandler
|
|||
ValidationException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of exceptions that should be logged with cleaned stack
|
||||
* traces to avoid exposing credentials or other sensitive information.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $cleanStacks = [
|
||||
PDOException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of the inputs that are never flashed for validation exceptions.
|
||||
*
|
||||
|
@ -73,7 +83,40 @@ class Handler extends ExceptionHandler
|
|||
throw $exception;
|
||||
}
|
||||
|
||||
return $logger->error($exception instanceof PDOException ? $exception->getMessage() : $exception);
|
||||
foreach ($this->cleanStacks as $class) {
|
||||
if ($exception instanceof $class) {
|
||||
$exception = $this->generateCleanedExceptionStack($exception);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $logger->error($exception);
|
||||
}
|
||||
|
||||
private function generateCleanedExceptionStack(Exception $exception)
|
||||
{
|
||||
$cleanedStack = '';
|
||||
foreach ($exception->getTrace() as $index => $item) {
|
||||
$cleanedStack .= sprintf(
|
||||
"#%d %s(%d): %s%s%s\n",
|
||||
$index,
|
||||
array_get($item, 'file'),
|
||||
array_get($item, 'line'),
|
||||
array_get($item, 'class'),
|
||||
array_get($item, 'type'),
|
||||
array_get($item, 'function')
|
||||
);
|
||||
}
|
||||
|
||||
$message = sprintf(
|
||||
'%s: %s in %s:%d',
|
||||
class_basename($exception),
|
||||
$exception->getMessage(),
|
||||
$exception->getFile(),
|
||||
$exception->getLine()
|
||||
);
|
||||
|
||||
return $message . "\nStack trace:\n" . trim($cleanedStack);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace Pterodactyl\Http\Controllers\Admin;
|
|||
|
||||
use PDOException;
|
||||
use Illuminate\View\View;
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
|
@ -136,22 +137,25 @@ class DatabaseController extends Controller
|
|||
* Handle updating database host.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Admin\DatabaseHostFormRequest $request
|
||||
* @param int $host
|
||||
* @param \Pterodactyl\Models\DatabaseHost $host
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function update(DatabaseHostFormRequest $request, int $host): RedirectResponse
|
||||
public function update(DatabaseHostFormRequest $request, DatabaseHost $host): RedirectResponse
|
||||
{
|
||||
$redirect = redirect()->route('admin.databases.view', $host->id);
|
||||
|
||||
try {
|
||||
$host = $this->updateService->handle($host, $request->normalize());
|
||||
$this->updateService->handle($host->id, $request->normalize());
|
||||
$this->alert->success('Database host was updated successfully.')->flash();
|
||||
} catch (PDOException $ex) {
|
||||
$this->alert->danger($ex->getMessage())->flash();
|
||||
$redirect->withInput($request->normalize());
|
||||
}
|
||||
|
||||
return redirect()->route('admin.databases.view', $host->id);
|
||||
return $redirect;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -107,7 +107,7 @@ class SecurityController extends Controller
|
|||
public function setTotp(Request $request)
|
||||
{
|
||||
try {
|
||||
$this->toggleTwoFactorService->handle($request->user(), $request->input('token'));
|
||||
$this->toggleTwoFactorService->handle($request->user(), $request->input('token') ?? '');
|
||||
|
||||
return response('true');
|
||||
} catch (TwoFactorAuthenticationTokenInvalid $exception) {
|
||||
|
@ -127,7 +127,7 @@ class SecurityController extends Controller
|
|||
public function disableTotp(Request $request)
|
||||
{
|
||||
try {
|
||||
$this->toggleTwoFactorService->handle($request->user(), $request->input('token'), false);
|
||||
$this->toggleTwoFactorService->handle($request->user(), $request->input('token') ?? '', false);
|
||||
} catch (TwoFactorAuthenticationTokenInvalid $exception) {
|
||||
$this->alert->danger(trans('base.security.2fa_disable_error'))->flash();
|
||||
}
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Http\Requests\Admin;
|
||||
|
||||
|
@ -18,14 +11,28 @@ class DatabaseHostFormRequest extends AdminFormRequest
|
|||
*/
|
||||
public function rules()
|
||||
{
|
||||
if (! $this->filled('node_id')) {
|
||||
$this->merge(['node_id' => null]);
|
||||
}
|
||||
|
||||
if ($this->method() !== 'POST') {
|
||||
return DatabaseHost::getUpdateRulesForId($this->route()->parameter('host'));
|
||||
}
|
||||
|
||||
return DatabaseHost::getCreateRules();
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify submitted data before it is passed off to the validator.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
*/
|
||||
protected function getValidatorInstance()
|
||||
{
|
||||
if (! $this->filled('node_id')) {
|
||||
$this->merge(['node_id' => null]);
|
||||
}
|
||||
|
||||
$this->merge([
|
||||
'host' => gethostbyname($this->input('host')),
|
||||
]);
|
||||
|
||||
return parent::getValidatorInstance();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ use Pterodactyl\Models\User;
|
|||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Models\Subuser;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Igaster\LaravelTheme\Facades\Theme;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Pterodactyl\Observers\UserObserver;
|
||||
use Pterodactyl\Observers\ServerObserver;
|
||||
|
@ -28,6 +29,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
|
||||
View::share('appVersion', $this->versionData()['version'] ?? 'undefined');
|
||||
View::share('appIsGit', $this->versionData()['is_git'] ?? false);
|
||||
Theme::setSetting('cache-version', md5($this->versionData()['version'] ?? 'undefined'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,9 @@ use Illuminate\Contracts\Validation\Rule;
|
|||
|
||||
class Username implements Rule
|
||||
{
|
||||
/**
|
||||
* Regex to use when validating usernames.
|
||||
*/
|
||||
public const VALIDATION_REGEX = '/^[a-z0-9]([\w\.-]+)[a-z0-9]$/';
|
||||
|
||||
/**
|
||||
|
@ -33,4 +36,15 @@ class Username implements Rule
|
|||
return 'The :attribute must start and end with alpha-numeric characters and
|
||||
contain only letters, numbers, dashes, underscores, and periods.';
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the rule to a validation string. This is necessary to avoid
|
||||
* issues with Eloquence which tries to use this rule as a string.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return 'p_username';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Services\Databases;
|
||||
|
||||
|
@ -65,13 +58,11 @@ class DatabaseManagementService
|
|||
* @return \Illuminate\Database\Eloquent\Model
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
*/
|
||||
public function create($server, array $data)
|
||||
{
|
||||
$data['server_id'] = $server;
|
||||
$data['database'] = sprintf('d%d_%s', $server, $data['database']);
|
||||
$data['database'] = sprintf('s%d_%s', $server, $data['database']);
|
||||
$data['username'] = sprintf('u%d_%s', $server, str_random(10));
|
||||
$data['password'] = $this->encrypter->encrypt(str_random(16));
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"fideloper/proxy": "^3.3",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"hashids/hashids": "^2.0",
|
||||
"igaster/laravel-theme": "^1.16",
|
||||
"igaster/laravel-theme": "^2.0.6",
|
||||
"laracasts/utilities": "^3.0",
|
||||
"laravel/framework": "5.5.*",
|
||||
"laravel/tinker": "^1.0",
|
||||
|
|
37
composer.lock
generated
37
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "86cf8a899601833098c86cb505764e92",
|
||||
"content-hash": "8c907d970c12c8d0722dbd21437dbfb6",
|
||||
"packages": [
|
||||
{
|
||||
"name": "appstract/laravel-blade-directives",
|
||||
|
@ -1113,36 +1113,43 @@
|
|||
},
|
||||
{
|
||||
"name": "igaster/laravel-theme",
|
||||
"version": "v1.16",
|
||||
"version": "v2.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/igaster/laravel-theme.git",
|
||||
"reference": "7816c4497feb326d11447737e8477779a713fc96"
|
||||
"reference": "d3835fd99418848ba130e3f7a73d3f78ab636471"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/igaster/laravel-theme/zipball/7816c4497feb326d11447737e8477779a713fc96",
|
||||
"reference": "7816c4497feb326d11447737e8477779a713fc96",
|
||||
"url": "https://api.github.com/repos/igaster/laravel-theme/zipball/d3835fd99418848ba130e3f7a73d3f78ab636471",
|
||||
"reference": "d3835fd99418848ba130e3f7a73d3f78ab636471",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": ">=5.2.0",
|
||||
"php": ">=5.4.0"
|
||||
"illuminate/contracts": "5.4.*|5.5.*|5.6.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"illuminate/database": "~5.2",
|
||||
"orchestra/testbench": "~3.0",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"vlucas/phpdotenv": "~2.0"
|
||||
"orchestra/testbench": "~3.4",
|
||||
"phpunit/phpunit": "^6.0"
|
||||
},
|
||||
"suggest": {
|
||||
"orchestra/asset": "Use '@css' and '@js' in Blade files"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Igaster\\LaravelTheme\\themeServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Theme": "Igaster\\LaravelTheme\\Facades\\Theme"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"igaster\\laravelTheme\\": "src/",
|
||||
"igaster\\laravelTheme\\Tests\\": "tests/"
|
||||
"Igaster\\LaravelTheme\\": "src/",
|
||||
"Igaster\\LaravelTheme\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -1156,7 +1163,7 @@
|
|||
}
|
||||
],
|
||||
"description": "Laravel 5 Themes: Asset & Views folder per theme. Theme inheritance. Blade integration and more...",
|
||||
"homepage": "https://github.com/igaster/laravel-theme",
|
||||
"homepage": "https://github.com/Igaster/laravel-theme.git",
|
||||
"keywords": [
|
||||
"assets",
|
||||
"blade",
|
||||
|
@ -1165,7 +1172,7 @@
|
|||
"themes",
|
||||
"views"
|
||||
],
|
||||
"time": "2017-06-07T15:24:25+00:00"
|
||||
"time": "2018-02-12T11:19:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jakub-onderka/php-console-color",
|
||||
|
|
|
@ -9,7 +9,7 @@ return [
|
|||
| change this value if you are not maintaining your own internal versions.
|
||||
*/
|
||||
|
||||
'version' => '0.7.0',
|
||||
'version' => '0.7.1',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -203,7 +203,7 @@ return [
|
|||
/*
|
||||
* Additional Dependencies
|
||||
*/
|
||||
igaster\laravelTheme\themeServiceProvider::class,
|
||||
Igaster\LaravelTheme\themeServiceProvider::class,
|
||||
Prologue\Alerts\AlertsServiceProvider::class,
|
||||
Lord\Laroute\LarouteServiceProvider::class,
|
||||
],
|
||||
|
@ -253,7 +253,7 @@ return [
|
|||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::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,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
|
|
|
@ -2,10 +2,57 @@
|
|||
|
||||
return [
|
||||
'enabled' => true,
|
||||
'themes_path' => realpath(base_path('resources/themes')),
|
||||
'asset_not_found' => 'LOG_ERROR',
|
||||
'active' => env('APP_THEME', 'pterodactyl'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Root path where theme Views will be located.
|
||||
| Can be outside default views path e.g.: resources/themes
|
||||
| Leave it null if you will put your themes in the default views folder
|
||||
| (as defined in config\views.php)
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'themes_path' => realpath(base_path('resources/themes')),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Set behavior if an asset is not found in a Theme hierarchy.
|
||||
| Available options: THROW_EXCEPTION | LOG_ERROR | IGNORE
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'asset_not_found' => 'LOG_ERROR',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Do we want a theme activated by default? Can be set at runtime with:
|
||||
| Theme::set('theme-name');
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'default' => env('APP_THEME', 'pterodactyl'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache theme.json configuration files that are located in each theme's folder
|
||||
| in order to avoid searching theme settings in the filesystem for each request
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'cache' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Define available themes. Format:
|
||||
|
|
||||
| 'theme-name' => [
|
||||
| 'extends' => 'theme-to-extend', // optional
|
||||
| 'views-path' => 'path-to-views', // defaults to: resources/views/theme-name
|
||||
| 'asset-path' => 'path-to-assets', // defaults to: public/theme-name
|
||||
|
|
||||
| // You can add your own custom keys
|
||||
| // Use Theme::getSetting('key') & Theme::setSetting('key', 'value') to access them
|
||||
| 'key' => 'value',
|
||||
| ],
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'themes' => [
|
||||
'pterodactyl' => [
|
||||
'extends' => null,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,16 +29,16 @@
|
|||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pName" class="form-label">Name</label>
|
||||
<input type="text" id="pName" name="name" class="form-control" value="{{ $host->name }}" />
|
||||
<input type="text" id="pName" name="name" class="form-control" value="{{ old('name', $host->name) }}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pHost" class="form-label">Host</label>
|
||||
<input type="text" id="pHost" name="host" class="form-control" value="{{ $host->host }}" />
|
||||
<input type="text" id="pHost" name="host" class="form-control" value="{{ old('host', $host->host) }}" />
|
||||
<p class="text-muted small">The IP address or FQDN that should be used when attempting to connect to this MySQL host <em>from the panel</em> to add new databases.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pPort" class="form-label">Port</label>
|
||||
<input type="text" id="pPort" name="port" class="form-control" value="{{ $host->port }}" />
|
||||
<input type="text" id="pPort" name="port" class="form-control" value="{{ old('port', $host->port) }}" />
|
||||
<p class="text-muted small">The port that MySQL is running on for this host.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -66,7 +66,7 @@
|
|||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pUsername" class="form-label">Username</label>
|
||||
<input type="text" name="username" id="pUsername" class="form-control" value="{{ $host->username }}" />
|
||||
<input type="text" name="username" id="pUsername" class="form-control" value="{{ old('username', $host->username) }}" />
|
||||
<p class="text-muted small">The username of an account that has enough permissions to create new users and databases on the system.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
@include('layouts.scripts')
|
||||
|
||||
@section('scripts')
|
||||
{!! Theme::css('vendor/select2/select2.min.css') !!}
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
|
||||
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
|
||||
{!! Theme::css('vendor/adminlte/colors/skin-blue.min.css') !!}
|
||||
{!! Theme::css('vendor/sweetalert/sweetalert.min.css') !!}
|
||||
{!! Theme::css('vendor/animate/animate.min.css') !!}
|
||||
{!! Theme::css('css/pterodactyl.css') !!}
|
||||
{!! Theme::css('vendor/select2/select2.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/adminlte/admin.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/adminlte/colors/skin-blue.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/sweetalert/sweetalert.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/animate/animate.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('css/pterodactyl.css?t={cache-version}') !!}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
|
@ -171,17 +171,17 @@
|
|||
{!! Theme::js('js/keyboard.polyfill.js') !!}
|
||||
<script>keyboardeventKeyPolyfill.polyfill();</script>
|
||||
|
||||
{!! Theme::js('js/laroute.js') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
|
||||
{!! Theme::js('vendor/sweetalert/sweetalert.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
||||
{!! Theme::js('vendor/slimscroll/jquery.slimscroll.min.js') !!}
|
||||
{!! Theme::js('vendor/adminlte/app.min.js') !!}
|
||||
{!! Theme::js('vendor/socketio/socket.io.v203.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
|
||||
{!! Theme::js('vendor/select2/select2.full.min.js') !!}
|
||||
{!! Theme::js('js/admin/functions.js') !!}
|
||||
{!! Theme::js('js/autocomplete.js') !!}
|
||||
{!! Theme::js('js/laroute.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/sweetalert/sweetalert.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/slimscroll/jquery.slimscroll.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/adminlte/app.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/socketio/socket.io.v203.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/select2/select2.full.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('js/admin/functions.js?t={cache-version}') !!}
|
||||
{!! Theme::js('js/autocomplete.js?t={cache-version}') !!}
|
||||
|
||||
@if(Auth::user()->root_admin)
|
||||
<script>
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
<meta name="theme-color" content="#367fa9">
|
||||
|
||||
@section('scripts')
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
|
||||
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
|
||||
{!! Theme::css('css/pterodactyl.css') !!}
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/adminlte/admin.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('css/pterodactyl.css?t={cache-version}') !!}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
|
@ -50,17 +50,17 @@
|
|||
<strong><i class="fa fa-fw fa-clock-o"></i></strong> {{ round(microtime(true) - LARAVEL_START, 3) }}s
|
||||
</div>
|
||||
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
||||
{!! Theme::js('js/autocomplete.js') !!}
|
||||
{!! Theme::js('vendor/particlesjs/particles.min.js') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('js/autocomplete.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/particlesjs/particles.min.js?t={cache-version}') !!}
|
||||
<script type="text/javascript">
|
||||
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
|
||||
$(function () {
|
||||
particlesJS.load('particles-js', '{!! Theme::url('vendor/particlesjs/particles.json') !!}', function() {});
|
||||
particlesJS.load('particles-js', '{!! Theme::url('vendor/particlesjs/particles.json?t={cache-version}') !!}', function() {});
|
||||
})
|
||||
</script>
|
||||
|
||||
@if(config('pterodactyl.lang.in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js') !!} @endif
|
||||
@if(config('pterodactyl.lang.in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js?t={cache-version}') !!} @endif
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
<meta name="theme-color" content="#367fa9">
|
||||
|
||||
@section('scripts')
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
|
||||
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
|
||||
{!! Theme::css('vendor/adminlte/colors/skin-blue.min.css') !!}
|
||||
{!! Theme::css('vendor/sweetalert/sweetalert.min.css') !!}
|
||||
{!! Theme::css('css/pterodactyl.css') !!}
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/adminlte/admin.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/adminlte/colors/skin-blue.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/sweetalert/sweetalert.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('css/pterodactyl.css?t={cache-version}') !!}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
|
@ -60,11 +60,11 @@
|
|||
</footer>
|
||||
</div>
|
||||
@section('footer-scripts')
|
||||
{!! Theme::js('js/laroute.js') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
||||
{!! Theme::js('vendor/slimscroll/jquery.slimscroll.min.js') !!}
|
||||
{!! Theme::js('vendor/adminlte/app.min.js') !!}
|
||||
{!! Theme::js('js/laroute.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/slimscroll/jquery.slimscroll.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/adminlte/app.min.js?t={cache-version}') !!}
|
||||
@show
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
@include('layouts.scripts')
|
||||
|
||||
@section('scripts')
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
|
||||
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
|
||||
{!! Theme::css('vendor/adminlte/colors/skin-blue.min.css') !!}
|
||||
{!! Theme::css('vendor/sweetalert/sweetalert.min.css') !!}
|
||||
{!! Theme::css('vendor/animate/animate.min.css') !!}
|
||||
{!! Theme::css('css/pterodactyl.css') !!}
|
||||
{!! Theme::css('vendor/bootstrap/bootstrap.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/adminlte/admin.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/adminlte/colors/skin-blue.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/sweetalert/sweetalert.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('vendor/animate/animate.min.css?t={cache-version}') !!}
|
||||
{!! Theme::css('css/pterodactyl.css?t={cache-version}') !!}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
|
@ -243,20 +243,20 @@
|
|||
<div class="control-sidebar-bg"></div>
|
||||
</div>
|
||||
@section('footer-scripts')
|
||||
{!! Theme::js('js/keyboard.polyfill.js') !!}
|
||||
{!! Theme::js('js/keyboard.polyfill.js?t={cache-version}') !!}
|
||||
<script>keyboardeventKeyPolyfill.polyfill();</script>
|
||||
|
||||
{!! Theme::js('js/laroute.js') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
|
||||
{!! Theme::js('vendor/sweetalert/sweetalert.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
||||
{!! Theme::js('vendor/slimscroll/jquery.slimscroll.min.js') !!}
|
||||
{!! Theme::js('vendor/adminlte/app.min.js') !!}
|
||||
{!! Theme::js('vendor/socketio/socket.io.v203.min.js') !!}
|
||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
|
||||
{!! Theme::js('js/autocomplete.js') !!}
|
||||
{!! Theme::js('js/laroute.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/jquery/jquery.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/sweetalert/sweetalert.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/slimscroll/jquery.slimscroll.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/adminlte/app.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/socketio/socket.io.v203.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js?t={cache-version}') !!}
|
||||
{!! Theme::js('js/autocomplete.js?t={cache-version}') !!}
|
||||
@if(config('pterodactyl.lang.in_context'))
|
||||
{!! Theme::js('vendor/phraseapp/phraseapp.js') !!}
|
||||
{!! Theme::js('vendor/phraseapp/phraseapp.js?t={cache-version}') !!}
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->root_admin)
|
||||
|
|
|
@ -7,6 +7,14 @@ use Pterodactyl\Rules\Username;
|
|||
|
||||
class UsernameTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Test that this rule can be cast to a string correctly.
|
||||
*/
|
||||
public function testRuleIsStringable()
|
||||
{
|
||||
$this->assertSame('p_username', (string) new Username);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test valid usernames.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue