Skip to content

Commit 24650b6

Browse files
committed
Merge branch 'develop' into fix/trusted-proxies
sorry
2 parents 8ab4faa + e5ed1c7 commit 24650b6

File tree

341 files changed

+13289
-7913
lines changed

Some content is hidden

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

341 files changed

+13289
-7913
lines changed

.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": ["es2015"],
3+
"compact": true,
4+
"minified": true,
5+
"only": "public/themes/pterodactyl/js/frontend/files/src/*.js",
6+
"sourceMaps": "inline",
7+
"comments": false
8+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 4
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.env.example

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
APP_ENV=production
22
APP_DEBUG=false
33
APP_KEY=SomeRandomString3232RandomString
4-
APP_THEME=default
4+
APP_THEME=pterodactyl
55
APP_TIMEZONE=UTC
66
APP_CLEAR_TASKLOG=720
77
APP_DELETE_MINUTES=10
8-
CONSOLE_PUSH_FREQ=250
9-
CONSOLE_PUSH_COUNT=10
8+
APP_URL=http://yoursite.com/
109

1110
DB_HOST=localhost
1211
DB_PORT=3306

.github/ISSUE_TEMPLATE.md

Lines changed: 4 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,6 @@
1-
<!-- The checkboxes below can be clicked once you submit this report if you'd like -->
2-
<!-- You can also use "- [x]" to mark it as checked. -->
3-
## Product
4-
Please check the corresponding boxes below for which products this is about.
1+
Please describe your issue in full below. Include what products are affected, as well as what version(s) you are running. Please also include information about your system, such as `uname -a` and `php -v` and `docker info` if applicable.
52

6-
- [ ] Panel
7-
- [ ] Daemon
8-
- [ ] Dockerfile(s) [Please list if so: __ ]
3+
If you're just making a suggestion, be descriptive, and link to any issues that might be releated as well.
94

10-
## Type
11-
- [ ] Bug or Issue
12-
- [ ] Feature Request
13-
- [ ] Enhancement
14-
- [ ] Other
15-
16-
<!-- You only need to fill out the information below if this is a bug report. -->
17-
<!-- Please delete this line and everything below if this is NOT a bug report. -->
18-
19-
## What Happens
20-
<!-- Please include a description of what is happening when you encounter this bug. -->
21-
22-
## How to Reproduce
23-
<!-- Please provide us a list of step for how to reproduce this issue. -->
24-
25-
1. Step 1
26-
2. Step 2
27-
3. etc.
28-
29-
## Error Logs
30-
<!-- Please include a paste output of the errors if they are logged. They can be found in: -->
31-
<!-- Panel: /var/www/pterodactyl/html/storage/logs/ Daemon: /srv/daemon/logs -->
32-
<!-- You can also paste them on https://gist.github.com and include their links below. -->
33-
34-
```
35-
error logs
36-
```
37-
38-
## System Information
39-
#### Output of `uname -a`:
40-
41-
```
42-
paste here
43-
```
44-
45-
#### Output of `php -v` (if Panel):
46-
47-
```
48-
paste here
49-
```
50-
51-
#### Output of `node -v` (if Daemon):
52-
53-
```
54-
paste here
55-
```
56-
57-
#### Output of `docker info` and `docker -v` (if Daemon or Dockerfiles):
58-
59-
```
60-
paste here
61-
```
5+
You can delete from this line up.
6+
---------------------

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ Homestead.yaml
99
Vagrantfile
1010
Vagrantfile
1111

12-
node_modules
13-
.babelrc
12+
node_modules

CHANGELOG.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,100 @@ 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
7+
### Added
8+
* 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.
9+
* Basic service pack implementation to allow assignment of modpacks or software to a server to pre-install applications and allow users to update.
10+
* Users can now have a username as well as client name assigned to their account.
11+
* Ability to create a node through the CLI using `pterodactyl:node` as well as locations via `pterodactyl:location`.
12+
* New theme (AdminLTE) for front-end with tweaks to backend files to work properly with it.
13+
14+
### Fixed
15+
* Bug causing error logs to be spammed if someone timed out on an ajax based page.
16+
* Fixes edge case where specific server names could cause daemon errors due to an invalid SFTP username being created by the panel.
17+
18+
### Changed
19+
* Admin API and base routes for user management now define the fields that should be passed to repositories rather than passing all fields.
20+
* User model now defines mass assignment fields using `$fillable` rather than `$guarded`.
21+
22+
### Deprecated
23+
24+
## v0.5.6 (Bodacious Boreopterus)
25+
### Added
26+
* Added the following languages: Estonian `et`, Dutch `nl`, Norwegian `nb` (partial), Romanian `ro`, and Russian `ru`. Interested in helping us translate the panel into more languages, or improving existing translations? Contact us on Discord and let us know.
27+
* Added missing `strings.password` to language file for English.
28+
* Allow listing of users from the API by passing either the user ID or their email.
29+
30+
### Fixed
31+
* Fixes bug where assigning a variable a default value (or valid value) of `0` would cause the panel to reject the value thinking it did not exist.
32+
* Addresses potential for crash by limiting total ports that can be assigned per-range to 2000.
33+
* Fixes server names requiring at minimum 4 characters. Name can now be 1 to 200 characters long. :pencil2:
34+
* Fixes bug that would allow adding the owner of a server as a subuser for that same server.
35+
* Fixes bug that would allow creating multiple subusers with the same email address.
36+
* Fixes bug where Sponge servers were improperly tagged as a spigot server in the daemon causing issues when booting or modifying configuration files.
37+
* Use transpiled ES6 -> ES5 filemanager code in browsers.
38+
* 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)
39+
40+
### Changed
41+
* 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.
42+
43+
## v0.5.5 (Bodacious Boreopterus)
44+
### Added
45+
* New API route to return allocations given a server ID. This adds support for a community-driven WHMCS module :rocket: available [here](https://github.com/hammerdawn/Pterodactyl-WHMCS).
46+
47+
### Fixed
48+
* Fixes subuser display when trying to edit an existing subuser.
49+
50+
## v0.5.4 (Bodacious Boreopterus)
51+
### Added
52+
* Changing node configuration values now automatically makes a call to the daemon and updates the configuration there. Changing daemon tokens now does not require any intervention, and takes effect immediately. SSL & Port configurations will still require a daemon reboot.
53+
* New button in file manager that triggers the right click menu to enable support on mobile devices and those who cannot right click (blessed be them).
54+
* Support for filtering users when listing all users on the system.
55+
* Container ID and User ID on the daemon are now shown when viewing a server in the panel.
56+
57+
### Changed
58+
* File uploads now account for a maximum file size that is assigned for the daemon, and gives cleaner errors when that limit is reached.
59+
* File upload limit can now be controlled from the panel.
60+
* Updates regex and default values for some Minecraft services to reflect current technology.
61+
62+
### Fixed
63+
* Fixes potential for generated password to not meet own validation requirements.
64+
* Fixes some regex checking issues with newer versions of Minecraft.
65+
66+
## v0.5.3 (Bodacious Boreopterus)
67+
### Fixed
68+
* Fixed an error that occurred when viewing a node listing when no nodes were created yet due to a mis-declared variable. Also fixes a bug that would have all nodes trying to connect to the daemon using the same secret token on the node listing, causing only the last node to display properly.
69+
* Fixes a bug that displayed the panel version rather than the daemon version when viewing a node.
70+
* Fixes a multiplicator being applied to an overallocation field rather than a storage space field when adding a node.
71+
72+
### Changed
73+
* Added a few new configuration variables for nodes to the default config, as well as a variable that will be used in future versions of the daemon.
74+
75+
## v0.5.2 (Bodacious Boreopterus)
76+
### Fixed
77+
* Time axis on server graphs is corrected to show the minutes rather than the current month.
78+
* Node deletion now works correctly and deletes allocations as well.
79+
* Fixes a bug that would leave orphaned databases on the system if there was an error during creation.
80+
* Fixes an issue that could occur if a UUID contained `#e#` formatting within it when it comes to creating databases.
81+
* Fixed node status display to account for updated daemon security changes.
82+
* Fixes default language being selected as German (defaults to English now).
83+
* Fixes bug preventing the deletion of database servers.
84+
85+
### Changed
86+
* Using `node:<name>` when filtering servers now properly filters the servers by node name, rather than looking for the node ID.
87+
* Using `owner:<email>` when filtering servers now properly filters by the owner's email rather than ID.
88+
* Added some quick help buttons to the admin index page for getting support or checking the documentation.
89+
* Panel now displays `Pterodactyl Panel` as the company name if one is not set.
90+
91+
### Added
92+
* Added basic information about the daemon when viewing a node, including the host OS and version, CPU count, and the daemon version.
93+
* Added version checking for the daemon and panel that alerts admins when daemons or the panel is out of date.
94+
* Added multiplicator support to certain memory and disk fields that allow users to enter `10g` and have it converted to MB automatically.
95+
96+
## v0.5.1 (Bodacious Boreopterus)
97+
### Fixed
98+
* Fixes a bug that allowed a user to bypass 2FA authentication if using the correct username and password for an account.
99+
6100
## v0.5.0 (Bodacious Boreopterus)
7101
After nearly a month in the works, version `v0.5.0` is finally here! 🎉
8102

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The MIT License (MIT)
22

33
```
4-
Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
4+
Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>
55
66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Support for using Pterodactyl can be found on our [wiki](https://github.com/Pter
66

77
## License
88
```
9-
Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
9+
Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>
1010
1111
Permission is hereby granted, free of charge, to any person obtaining a copy
1212
of this software and associated documentation files (the "Software"), to deal
@@ -33,6 +33,8 @@ A huge thanks to [PhraseApp](https://phraseapp.com) who provide us the software
3333

3434
Ace Editor - [license](https://github.com/ajaxorg/ace/blob/master/LICENSE) - [homepage](https://ace.c9.io)
3535

36+
AdminLTE - [license](https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE) - [homepage](https://almsaeedstudio.com)
37+
3638
Animate.css - [license](https://github.com/daneden/animate.css/blob/master/LICENSE) - [homepage](http://daneden.github.io/animate.css/)
3739

3840
Async.js - [license](https://github.com/caolan/async/blob/master/LICENSE) - [homepage](https://github.com/caolan/async/)
@@ -57,8 +59,12 @@ jQuery Terminal - [license](https://github.com/jcubic/jquery.terminal/blob/maste
5759

5860
Lodash - [license](https://github.com/lodash/lodash/blob/master/LICENSE) - [homepage](https://lodash.com/)
5961

62+
Select2 - [license](https://github.com/select2/select2/blob/master/LICENSE.md) - [homepage](https://select2.github.io)
63+
6064
Socket.io - [license](https://github.com/socketio/socket.io/blob/master/LICENSE) - [homepage](http://socket.io)
6165

66+
Socket.io File Upload - [license](https://github.com/vote539/socketio-file-upload/blob/master/server.js#L1-L27) - [homepage](https://github.com/vote539/socketio-file-upload)
67+
6268
SweetAlert - [license](https://github.com/t4t5/sweetalert/blob/master/LICENSE) - [homepage](http://t4t5.github.io/sweetalert/)
6369

6470
Typeahead — [license](https://github.com/bassjobsen/Bootstrap-3-Typeahead/blob/master/bootstrap3-typeahead.js)[homepage](https://github.com/bassjobsen/Bootstrap-3-Typeahead)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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\Console\Commands;
26+
27+
use Illuminate\Console\Command;
28+
use Pterodactyl\Repositories\LocationRepository;
29+
30+
class AddLocation extends Command
31+
{
32+
protected $data = [];
33+
34+
/**
35+
* The name and signature of the console command.
36+
*
37+
* @var string
38+
*/
39+
protected $signature = 'pterodactyl:location
40+
{--short= : The shortcode name of this location (ex. us1).}
41+
{--long= : A longer description of this location.}';
42+
43+
/**
44+
* The console command description.
45+
*
46+
* @var string
47+
*/
48+
protected $description = 'Creates a new location on the system via the CLI.';
49+
50+
/**
51+
* Create a new command instance.
52+
*
53+
* @return void
54+
*/
55+
public function __construct()
56+
{
57+
parent::__construct();
58+
}
59+
60+
/**
61+
* Execute the console command.
62+
*
63+
* @return mixed
64+
*/
65+
public function handle()
66+
{
67+
$this->data['short'] = (is_null($this->option('short'))) ? $this->ask('Location Short Code') : $this->option('short');
68+
$this->data['long'] = (is_null($this->option('long'))) ? $this->ask('Location Description') : $this->option('long');
69+
70+
$repo = new LocationRepository;
71+
$id = $repo->create($this->data);
72+
73+
$this->info('Location ' . $this->data['short'] . ' created with ID: ' . $id);
74+
}
75+
}

0 commit comments

Comments
 (0)