Skip to content

Commit 3a88deb

Browse files
committed
Merge branch 'develop' into feature/new-theme
# Conflicts: # .gitignore # public/themes/pterodactyl/js/frontend/files/filemanager.min.js # public/themes/pterodactyl/js/frontend/files/filemanager.min.js.map # public/themes/pterodactyl/js/frontend/serverlist.js # resources/themes/pterodactyl/server/files/list.blade.php
2 parents f6d5ffa + c021872 commit 3a88deb

File tree

170 files changed

+9004
-2203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+9004
-2203
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ DB_DATABASE=homestead
1313
DB_USERNAME=homestead
1414
DB_PASSWORD=secret
1515

16-
CACHE_DRIVER=file
16+
CACHE_DRIVER=memcached
1717
SESSION_DRIVER=database
1818

1919
MAIL_DRIVER=smtp

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Vagrantfile
1111

1212
node_modules
1313
yarn.lock
14+
node_modules

CHANGELOG.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,66 @@ This file is a running track of new features and fixes to each version of the pa
33

44
This project follows [Semantic Versioning](http://semver.org) guidelines.
55

6-
## v0.6.0-pre.1
6+
## v0.6.0-pre.4 (Courageous Carniadactylus)
7+
### Fixed
8+
* `[pre.3]` — Fixes bug in cache handler that doesn't cache against the user making the request. Would have allowed for users to access servers not belonging to themselves in production.
9+
* `[pre.3]` — Fixes misnamed MySQL column that was causing the inability to delete certain port ranges from the database.
10+
* `[pre.3]` — Fixes bug preventing rebuilding server containers through the Admin CP.
11+
12+
### Added
13+
* New cache policy for ServerPolicy to avoid making 15+ queries per page load when confirming if a user has permission to perform an action.
14+
15+
## v0.6.0-pre.3 (Courageous Carniadactylus)
16+
### Fixed
17+
* `[pre.2]` — Fixes bug where servers could not be manually deployed to nodes due to a broken SQL call.
18+
* `[pre.2]` — Fixes inability to edit a server due to owner_id issues.
19+
* `[pre.2]` — Fixes bug when trying to add new subusers.
20+
* Emails sending with 'Pterodactyl Panel' as the from name. Now configurable by using `php artisan pterodactyl:mail` to update.
21+
* `[pre.2]` — Fixes inability to delete accounts due to SQL changes.
22+
* `[pre.2]` — Fixes bug with checking power-permissions that showed the wrong buttons. Also adds check back to sidebar to only show options a user can use.
23+
* `[pre.2]` — Fixes allocation listing on node allocations tab as well as bug preventing deletion of port.
24+
* `[pre.2]` — Fixes bug in services that prevented saving updated settings or creating new services.
25+
26+
### Changed
27+
* `[pre.2]` — File Manager now displays relevant information on all screen sizes, and includes better button clicking mechanics for dropdown menu.
28+
* Reduced the number of database queries being executed when viewing a specific server. This is done by caching the query for up to 60 minutes in memcached.
29+
* User creation emails include more information and are sent by the event listener rather than the repository.
30+
* Account password reset emails now auto-fill the email when clicking the link.
31+
32+
### Added
33+
* Notifications when a user is added or removed as a subuser for a server.
34+
35+
## v0.6.0-pre.2 (Courageous Carniadactylus)
36+
### Fixed
37+
* `[pre.1]` — Fixes bug with database seeders that prevented correctly installing the panel.
38+
39+
### Changed
40+
* `[pre.1]` — Moved around navigation bar on fronted to make it more obvious where logout and admin buttons were, as well as use the right icon for server listing.
41+
42+
## v0.6.0-pre.1 (Courageous Carniadactylus)
743
### Added
844
* Remote routes for daemon to contact in order to allow Daemon to retrieve updated service configuration files on boot. Centralizes services to the panel rather than to each daemon.
945
* Basic service pack implementation to allow assignment of modpacks or software to a server to pre-install applications and allow users to update.
1046
* Users can now have a username as well as client name assigned to their account.
1147
* Ability to create a node through the CLI using `pterodactyl:node` as well as locations via `pterodactyl:location`.
1248
* New theme (AdminLTE) for front-end with tweaks to backend files to work properly with it.
49+
* Add support for PhraseApp's in-context editor
1350

1451
### Fixed
1552
* Bug causing error logs to be spammed if someone timed out on an ajax based page.
1653
* Fixes edge case where specific server names could cause daemon errors due to an invalid SFTP username being created by the panel.
54+
* Fixes sessions being removed on browser close, and set sessions to idle for up to 3 hours before being marked as expired.
1755

1856
### Changed
1957
* Admin API and base routes for user management now define the fields that should be passed to repositories rather than passing all fields.
2058
* User model now defines mass assignment fields using `$fillable` rather than `$guarded`.
59+
* 2FA checkpoint on login is now its own page, and not an AJAX based call. Improves security on that front.
60+
* Updated Server model code to be more efficient, as well as make life easier for backend changes and work.
2161

2262
### Deprecated
63+
* `Server::getUserDaemonSecret(Server $server)` was removed and replaced with `User::daemonSecret(Server $server)` in order to clean up models.
64+
* `Server::getByUUID()` was replaced with `Server::byUuid()` as well as various other functions through-out the Server model.
65+
* `Server::getHeaders()` was removed and replaced with `Server::getClient()` which returns a Guzzle Client with the correct headers already assigned.
2366

2467
## v0.5.6 (Bodacious Boreopterus)
2568
### Added

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
[![Logo Image](https://cdn.pterodactyl.io/logos/Banner%20Logo%20Black@2x.png)](https://pterodactyl.io)
2+
13
## Pterodactyl Panel
2-
Pterodactyl is the free game server management panel designed by users, for users. Featuring support for Vanilla Minecraft, Spigot, Source Dedicated Servers, BungeeCord, and many more. Pterodactyl is built on the `Laravel PHP Framework (v5.3)`.
4+
Pterodactyl Panel is the free, open-source, game agnostic, self-hosted control panel for users, networks, and game service providers. Pterodactyl supports games and servers such as Minecraft (including Spigot, Bungeecord, and Sponge), ARK: Evolution Evolved, CS:GO, Team Fortress 2, Insurgency, Teamspeak 3, Mumble, and many more. Control all of your games from one unified interface.
35

46
## Support & Documentation
5-
Support for using Pterodactyl can be found on our [wiki](https://github.com/Pterodactyl/Panel/wiki) or on our [Discord chat](https://discord.gg/0gYt8oU8QOkDhKLS).
7+
Support for using Pterodactyl can be found on our [Documentation Website](https://docs.pterodactyl.io), our [Discord Chat](https://discord.gg/QRDZvVm), or via our [Forums](https://forums.pterodactyl.io).
68

79
## License
810
```
9-
Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>
11+
Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
1012
1113
Permission is hereby granted, free of charge, to any person obtaining a copy
1214
of this software and associated documentation files (the "Software"), to deal
@@ -39,8 +41,6 @@ Animate.css - [license](https://github.com/daneden/animate.css/blob/master/LICEN
3941

4042
Async.js - [license](https://github.com/caolan/async/blob/master/LICENSE) - [homepage](https://github.com/caolan/async/)
4143

42-
BinaryJS - [license](https://github.com/binaryjs/binaryjs/blob/master/LICENSE) - [homepage](http://binaryjs.com)
43-
4444
Bootstrap - [license](https://github.com/twbs/bootstrap/blob/master/LICENSE) - [homepage](http://getbootstrap.com)
4545

4646
BootStrap Notify - [license](https://github.com/mouse0270/bootstrap-notify/blob/master/LICENSE) - [homepage](http://bootstrap-notify.remabledesigns.com)
@@ -51,12 +51,12 @@ FontAwesome - [license](http://fontawesome.io/license/) - [homepage](http://font
5151

5252
FontAwesome Animations - [license](https://github.com/l-lin/font-awesome-animation#license) - [homepage](https://github.com/l-lin/font-awesome-animation)
5353

54-
FuelUX - [license](https://github.com/ExactTarget/fuelux/blob/master/LICENSE) - [homepage](http://getfuelux.com)
55-
5654
jQuery - [license](https://github.com/jquery/jquery/blob/master/LICENSE.txt) - [homepage](http://jquery.com)
5755

5856
jQuery Terminal - [license](https://github.com/jcubic/jquery.terminal/blob/master/LICENSE) - [homepage](http://terminal.jcubic.pl)
5957

58+
Laravel Framework - [license](https://github.com/laravel/framework/blob/5.4/LICENSE.md) - [homepage](https://laravel.com)
59+
6060
Lodash - [license](https://github.com/lodash/lodash/blob/master/LICENSE) - [homepage](https://lodash.com/)
6161

6262
Select2 - [license](https://github.com/select2/select2/blob/master/LICENSE.md) - [homepage](https://select2.github.io)
@@ -74,6 +74,6 @@ Some Javascript and CSS used within the panel is licensed under a `MIT` or `Apac
7474

7575
Some images used within Pterodactyl are Copyright (c) their respective owners.
7676

77-
`/public/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/)
77+
`/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/)
7878

79-
`/public/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/)
79+
`/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/)

app/Console/Commands/UpdateEmailSettings.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class UpdateEmailSettings extends Command
3636
protected $signature = 'pterodactyl:mail
3737
{--driver=}
3838
{--email=}
39+
{--from-name=}
3940
{--host=}
4041
{--port=}
4142
{--username=}
@@ -137,6 +138,7 @@ public function handle()
137138
}
138139

139140
$variables['MAIL_FROM'] = is_null($this->option('email')) ? $this->ask('Email address emails should originate from') : $this->option('email');
141+
$variables['MAIL_FROM_NAME'] = is_null($this->option('from-name')) ? $this->ask('Name emails should appear to be from') : $this->option('from-name');
140142
$variables['MAIL_ENCRYPTION'] = 'tls';
141143

142144
$bar = $this->output->createProgressBar(count($variables));
@@ -155,6 +157,9 @@ public function handle()
155157

156158
file_put_contents($file, $envContents);
157159
$bar->finish();
160+
161+
$this->line('Updating evironment configuration cache file.');
162+
$this->call('config:cache');
158163
echo "\n";
159164
}
160165
}

app/Console/Commands/UpdateEnvironment.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ public function handle()
134134
$variables['APP_TIMEZONE'] = $this->option('timezone');
135135
}
136136

137+
$variables['APP_THEME'] = 'pterodactyl';
138+
$variables['CACHE_DRIVER'] = 'memcached';
139+
$variables['SESSION_DRIVER'] = 'database';
140+
137141
$bar = $this->output->createProgressBar(count($variables));
138142

139143
$this->line('Writing new environment configuration to file.');
@@ -150,6 +154,9 @@ public function handle()
150154

151155
file_put_contents($file, $envContents);
152156
$bar->finish();
157+
158+
$this->line('Updating evironment configuration cache file.');
159+
$this->call('config:cache');
153160
echo "\n";
154161
}
155162
}
Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,42 +22,24 @@
2222
* SOFTWARE.
2323
*/
2424

25-
namespace Pterodactyl\Models;
25+
namespace Pterodactyl\Events\Server;
2626

27-
use Illuminate\Database\Eloquent\Model;
27+
use Pterodactyl\Models\Server;
28+
use Illuminate\Queue\SerializesModels;
2829

29-
class ServiceOptions extends Model
30+
class Created
3031
{
31-
/**
32-
* The table associated with the model.
33-
*
34-
* @var string
35-
*/
36-
protected $table = 'service_options';
32+
use SerializesModels;
33+
34+
public $server;
3735

3836
/**
39-
* Fields that are not mass assignable.
37+
* Create a new event instance.
4038
*
41-
* @var array
39+
* @return void
4240
*/
43-
protected $guarded = ['id', 'created_at', 'updated_at'];
44-
45-
/**
46-
* Cast values to correct type.
47-
*
48-
* @var array
49-
*/
50-
protected $casts = [
51-
'parent_service' => 'integer',
52-
];
53-
54-
/**
55-
* Gets all variables associated with this service.
56-
*
57-
* @return \Illuminate\Database\Eloquent\Relations\HasMany
58-
*/
59-
public function variables()
60-
{
61-
return $this->hasMany(ServiceVariables::class, 'option_id');
62-
}
41+
public function __construct(Server $server)
42+
{
43+
$this->server = $server;
44+
}
6345
}

app/Events/Server/Creating.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
* Pterodactyl - Panel
4+
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
namespace Pterodactyl\Events\Server;
26+
27+
use Pterodactyl\Models\Server;
28+
use Illuminate\Queue\SerializesModels;
29+
30+
class Creating
31+
{
32+
use SerializesModels;
33+
34+
public $server;
35+
36+
/**
37+
* Create a new event instance.
38+
*
39+
* @return void
40+
*/
41+
public function __construct(Server $server)
42+
{
43+
$this->server = $server;
44+
}
45+
}

app/Events/Server/Deleted.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
* Pterodactyl - Panel
4+
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
namespace Pterodactyl\Events\Server;
26+
27+
use Pterodactyl\Models\Server;
28+
use Illuminate\Queue\SerializesModels;
29+
30+
class Deleted
31+
{
32+
use SerializesModels;
33+
34+
public $server;
35+
36+
/**
37+
* Create a new event instance.
38+
*
39+
* @return void
40+
*/
41+
public function __construct(Server $server)
42+
{
43+
$this->server = $server;
44+
}
45+
}

app/Events/Server/Deleting.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
* Pterodactyl - Panel
4+
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
namespace Pterodactyl\Events\Server;
26+
27+
use Pterodactyl\Models\Server;
28+
use Illuminate\Queue\SerializesModels;
29+
30+
class Deleting
31+
{
32+
use SerializesModels;
33+
34+
public $server;
35+
36+
/**
37+
* Create a new event instance.
38+
*
39+
* @return void
40+
*/
41+
public function __construct(Server $server)
42+
{
43+
$this->server = $server;
44+
}
45+
}

0 commit comments

Comments
 (0)