From f5fc27a19c769a9caa185311777a465bec955e13 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Wed, 17 Jan 2018 22:10:08 -0500 Subject: [PATCH 1/7] Fix #872 (#876) --- public/themes/pterodactyl/css/pterodactyl.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/themes/pterodactyl/css/pterodactyl.css b/public/themes/pterodactyl/css/pterodactyl.css index 572b3b634..58003a338 100644 --- a/public/themes/pterodactyl/css/pterodactyl.css +++ b/public/themes/pterodactyl/css/pterodactyl.css @@ -456,3 +456,11 @@ label.control-label > span.field-optional:before { .pagination > li > a, .pagination > li > span { padding: 3px 10px !important; } + +body.sidebar-collapse .main-header .logo { + overflow: hidden; + text-indent: 100%; + background-image: url('/favicons/favicon-32x32.png'); + background-repeat: no-repeat; + background-position: center; +} From 016c4f4782883a857a32f2bb80844c3be5a14d04 Mon Sep 17 00:00:00 2001 From: DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com> Date: Sat, 20 Jan 2018 19:54:48 +0200 Subject: [PATCH 2/7] Remove mentions of 404/403 .jpg files (#884) They are nowhere to be found on latest dev branch, correct me if they should still be there. --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index f586b3317..c74fa7945 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,3 @@ particles.js — [license](https://github.com/VincentGarreau/particles.js/blob/m ### Additional License Information Some Javascript and CSS used within the panel is licensed under a `MIT` or `Apache 2.0`. Please check their respective header files for more information. - -Some images used within Pterodactyl are Copyright (c) their respective owners. - -`/public/themes/default/images/403.jpg` is licensed under a [CC BY 2.0](http://creativecommons.org/licenses/by/2.0/) by [BigTallGuy](http://flickr.com/photos/bigtallguy/) - -`/public/themes/default/images/404.jpg` is licensed under a [CC BY-SA 2.0](http://creativecommons.org/licenses/by-sa/2.0/) by [nicsuzor](http://flickr.com/photos/nicsuzor/) From 62fd299fa21c25962113b20ca7201274f71114ba Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 21 Jan 2018 11:38:16 -0600 Subject: [PATCH 3/7] Fix some egregious search and replace action... --- app/Policies/APIKeyPolicy.php | 2 +- app/Policies/ServerPolicy.php | 2 +- app/Repositories/Eloquent/NodeRepository.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Policies/APIKeyPolicy.php b/app/Policies/APIKeyPolicy.php index e8556ca9c..69ce45c04 100644 --- a/app/Policies/APIKeyPolicy.php +++ b/app/Policies/APIKeyPolicy.php @@ -39,7 +39,7 @@ class APIKeyPolicy })->values(); }); - return $permissions->setSearchTerm($permission, true) !== false; + return $permissions->search($permission, true) !== false; } /** diff --git a/app/Policies/ServerPolicy.php b/app/Policies/ServerPolicy.php index 8891fa87f..9b4db6f05 100644 --- a/app/Policies/ServerPolicy.php +++ b/app/Policies/ServerPolicy.php @@ -32,7 +32,7 @@ class ServerPolicy })->values(); }); - return $permissions->setSearchTerm($permission, true) !== false; + return $permissions->search($permission, true) !== false; } /** diff --git a/app/Repositories/Eloquent/NodeRepository.php b/app/Repositories/Eloquent/NodeRepository.php index ed0dce003..61d93927e 100644 --- a/app/Repositories/Eloquent/NodeRepository.php +++ b/app/Repositories/Eloquent/NodeRepository.php @@ -65,7 +65,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa $instance = $this->getBuilder()->with('location')->withCount('servers'); if ($this->hasSearchTerm()) { - $instance->setSearchTerm($this->getSearchTerm()); + $instance->search($this->getSearchTerm()); } return $instance->paginate(25, $this->getColumns()); From bd5952bf009eef0b06f9ddf32be86038ee868332 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 21 Jan 2018 11:40:02 -0600 Subject: [PATCH 4/7] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bbceffb4..ed15d3c04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ 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.0-beta.5 (Derelict Dermodactylus) +### Fixed +* `[beta.4]` — Fixes some bad search and replace action that happened previously and was throwing errors when validating user permissions. + ## v0.7.0-beta.4 (Derelict Dermodactylus) ### 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. From 2212f28351b24e3e756426eddcf6c7f6e58d5684 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 21 Jan 2018 11:58:59 -0600 Subject: [PATCH 5/7] Don't break the page if no variable rules are provided. --- CHANGELOG.md | 1 + .../Admin/Egg/EggVariableFormRequest.php | 18 ++++++++++-------- .../pterodactyl/admin/eggs/variables.blade.php | 14 +++++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed15d3c04..e258be272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ### v0.7.0-beta.5 (Derelict Dermodactylus) ### Fixed * `[beta.4]` — Fixes some bad search and replace action that happened previously and was throwing errors when validating user permissions. +* `[beta.4]` — Fixes behavior of variable validation to not break the page when no rules are provided. ## v0.7.0-beta.4 (Derelict Dermodactylus) ### Fixed diff --git a/app/Http/Requests/Admin/Egg/EggVariableFormRequest.php b/app/Http/Requests/Admin/Egg/EggVariableFormRequest.php index 621fbd772..f39cdd00c 100644 --- a/app/Http/Requests/Admin/Egg/EggVariableFormRequest.php +++ b/app/Http/Requests/Admin/Egg/EggVariableFormRequest.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Http\Requests\Admin\Egg; @@ -15,6 +8,8 @@ use Pterodactyl\Http\Requests\Admin\AdminFormRequest; class EggVariableFormRequest extends AdminFormRequest { /** + * Define rules for validation of this request. + * * @return array */ public function rules() @@ -23,7 +18,7 @@ class EggVariableFormRequest extends AdminFormRequest 'name' => 'required|string|min:1|max:255', 'description' => 'sometimes|nullable|string', 'env_variable' => 'required|regex:/^[\w]{1,255}$/|notIn:' . EggVariable::RESERVED_ENV_NAMES, - 'default_value' => 'string', + 'default_value' => 'nullable|string', 'options' => 'sometimes|required|array', 'rules' => 'bail|required|string', ]; @@ -41,6 +36,13 @@ class EggVariableFormRequest extends AdminFormRequest $rules = $this->input('rules', $this->route()->parameter('egg')->rules); } + // If rules is not a string it is already violating the rule defined above + // so just skip the addition of default value rules since this request + // will fail anyways. + if (! is_string($rules)) { + return; + } + $validator->addRules(['default_value' => $rules]); } } diff --git a/resources/themes/pterodactyl/admin/eggs/variables.blade.php b/resources/themes/pterodactyl/admin/eggs/variables.blade.php index 5ceeda675..bd18e05cf 100644 --- a/resources/themes/pterodactyl/admin/eggs/variables.blade.php +++ b/resources/themes/pterodactyl/admin/eggs/variables.blade.php @@ -99,25 +99,25 @@