Commit Graph

276 Commits

Author SHA1 Message Date
Matthew Penner
2a370a8776 downloader: fix internal range check 2021-08-02 15:16:38 -06:00
Matthew Penner
3c54c1f840 break everything
- upgrade dependencies
- run gofmt and goimports to organize code
- fix typos
- other small tweaks
2021-08-02 15:07:00 -06:00
Matthew Penner
73570c7144
installer: support 'start_on_completion' (#96) 2021-07-04 15:08:05 -07:00
Dane Everitt
fb0e769306 fix error when out of disk space; closes pterodactyl/panel#3273 2021-04-18 14:48:42 -07:00
Dane Everitt
4b244e96fb Fix .rar file decompression; closes pterodactyl/panel#3267 2021-04-17 13:13:37 -07:00
Dane Everitt
16b0ca3a8e Use io#LimitReader to avoid panic when reading files with active writes; closes pterodactyl/panel#3131 2021-04-04 10:42:03 -07:00
Dane Everitt
f57c24002e More API response fixing 2021-04-04 10:20:27 -07:00
Dane Everitt
2e0496c1f9 Add note about handling of UTF-8 sequences in properties files. 2021-04-03 14:02:37 -07:00
Dane Everitt
d4b63bef39 Fix details fetching for a single server instance 2021-04-03 13:15:11 -07:00
Dane Everitt
b448310a33 Correctly return servers installed on wings and their resource usage 2021-04-03 11:08:26 -07:00
antony1060
b691b8f06f
Fixed /api/servers 2021-04-02 21:32:30 +02:00
Matthew Penner
471886dd34 internally mark if a server is restoring to restrict actions 2021-03-12 16:19:35 -07:00
Matthew Penner
0e3778ac47 transfers: use backup archiver 2021-03-07 11:04:15 -07:00
Dane Everitt
fb2dc39a47 Remove some forgotten debug 2021-03-03 21:00:58 -08:00
Dane Everitt
0919fb2da6 Improve error handling and reporting for server installation & process boot 2021-03-03 20:56:18 -08:00
Dane Everitt
2eb721bbe7 Merge branch 'dane/api-cleanup' into develop 2021-02-23 21:25:10 -08:00
Daniel Barton
4ed0bf522b Quote and escape Content-Disposition header 2021-02-21 15:05:43 +08:00
Matthew Penner
00195b4a5b downloader: properly detect and handle integer IPs 2021-02-12 16:35:51 -07:00
Dane Everitt
bfff094216
Get wings booting properly 2021-02-01 21:32:34 -08:00
Dane Everitt
98c68142cd
Remove all of the remaining API logic and port it all to the remote.Client type 2021-02-01 21:28:46 -08:00
Dane Everitt
4bd18f7dd8
Send restoration status information to the console 2021-01-30 18:49:07 -08:00
Dane Everitt
adc0732af3
Better error handling and logging for restorations 2021-01-30 18:43:35 -08:00
Dane Everitt
13541524c3
Use server context 2021-01-26 19:36:35 -08:00
Dane Everitt
4411493006
Merge branch 'develop' into dane/backup-restore 2021-01-25 20:32:32 -08:00
Dane Everitt
f3a6ee7a45
re-refactor code 2021-01-25 20:28:24 -08:00
Dane Everitt
ab86fb703a
Merge branch 'develop' into schrej/refactor 2021-01-25 19:31:16 -08:00
Dane Everitt
981071cda8
Merge branch 'develop' into dane/backup-restore 2021-01-25 19:17:14 -08:00
Dane Everitt
56af6fc1f8
Correctly abort on file missing without panic 2021-01-21 20:58:40 -08:00
Dane Everitt
3f84ee694b
Get backups restoring kinda 2021-01-20 20:03:14 -08:00
Dane Everitt
6ef0bd7496
Get general concept for backup resotration using a unified interface implemented 2021-01-18 21:20:58 -08:00
Dane Everitt
66b6f40b61
Fix import cycle issue 2021-01-17 21:05:51 -08:00
Dane Everitt
7dd0acebc0
Initial untested pass at restoring from local backups 2021-01-16 18:06:22 -08:00
Dane Everitt
6a286fb444
unnecessary link 2021-01-16 17:06:50 -08:00
Dane Everitt
464f26a2c9
Include the request ID in the request logs 2021-01-16 12:07:31 -08:00
Dane Everitt
2968ea3498
Modify stat to embed os.FileInfo differently and update file content reader 2021-01-16 12:03:55 -08:00
Dane Everitt
67ecbd667a
Minor improvements to logic around decompression 2021-01-16 11:48:30 -08:00
Dane Everitt
b17cf5b93d
More middleware cleanup and movement 2021-01-16 11:19:33 -08:00
Dane Everitt
f6669213e8
Begin refactoring and improving the middleware 2021-01-16 11:02:57 -08:00
Dane Everitt
c2cfaf44b5
Get wings booting again 2021-01-14 20:32:38 -08:00
Dane Everitt
e9e70b6081
Better error handling; skip file when unarchiving 2021-01-10 17:01:41 -08:00
Dane Everitt
b10e4dd437
Better error handling for access to denylist files 2021-01-10 16:43:33 -08:00
Dane Everitt
2c1b211280
Add base idea for denying write access to certain files; ref pterodactyl/panel#569 2021-01-10 16:33:39 -08:00
Jakob Schrettenbrunner
c9c949a091 rename ServerManagerFromContext from ExtractServerManager 2021-01-10 02:18:02 +00:00
Dane Everitt
96256ac63e
[security] fix vulnerability when handling remote file redirects
Also adds the ability for an admin to just completely disable this service if it is not needed on the node.
2021-01-09 17:52:27 -08:00
Jakob Schrettenbrunner
8192244fec replace servers.servers singleton with server.Manager 2021-01-10 02:37:02 +01:00
Jakob Schrettenbrunner
648072436f organize imports with gopls format 2021-01-10 01:22:39 +00:00
Dane Everitt
b82f5f9a32
[security] deny downloading files from internal locations 2021-01-06 21:34:18 -08:00
Jakob
3f6eb7e41a
no need for additional decode (#81)
file paths used to be url-encoded twice, which is no longer the case.
2021-01-03 17:20:16 -08:00
Matthew Penner
d3ddf8cf39 Mark server as not transferring after archive failure 2021-01-02 10:11:25 -07:00
Dane Everitt
7549eb13a0
Merge branch 'develop' of https://github.com/pterodactyl/wings into develop 2020-12-27 16:17:17 -08:00
Dane Everitt
902f9f5944
Include more (and customizable) context with backup logs 2020-12-27 16:16:40 -08:00
Matthew Penner
3a7c4822f8 Improve logged stacktraces 2020-12-27 13:55:58 -07:00
Matthew Penner
de4d2f4724 Make logs follow a more consistent format 2020-12-27 13:01:34 -07:00
Matthew Penner
a4c8b8714b Bump all dependencies 2020-12-27 11:49:08 -07:00
Matthew Penner
5be6e20b03 Send archive status request before sending the transfer status event 2020-12-26 11:42:44 -07:00
Dane Everitt
3842f054a5
These need spaces? 2020-12-25 15:14:21 -08:00
Dane Everitt
510d46289b
security: don't reveal wings version in remote API calls 2020-12-25 15:06:17 -08:00
Dane Everitt
6e5b14c466
Prevent malicious code from causing a server UUID to be used that is not valid 2020-12-25 15:01:43 -08:00
Dane Everitt
b3922864f2
Simplify origin checking 2020-12-25 14:40:28 -08:00
Dane Everitt
bb132243ed
Merge branch 'develop' of https://github.com/pterodactyl/wings into develop 2020-12-25 13:57:33 -08:00
Dane Everitt
d96115325a
Add file helper 2020-12-25 13:57:26 -08:00
Matthew Penner
a450abc080 Don't read directories either, add completion log for transfers 2020-12-25 14:46:33 -07:00
Matthew Penner
0a45ea44a4 Return a user-friendly error for an invalid file mode 2020-12-25 14:41:38 -07:00
Matthew Penner
5c78cb9ab3
Add transfer logging output (#77)
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2020-12-25 13:32:41 -08:00
Dane Everitt
c0523df696
Add a server context that gets canceled when a server is deleted 2020-12-25 11:21:09 -08:00
Dane Everitt
f7f5623c71
Set UA and limit simultaneous downloads 2020-12-24 09:01:00 -08:00
Dane Everitt
184013b652
Include endpoints for getting active downloads for a server 2020-12-20 13:14:07 -08:00
Dane Everitt
c8d297a056
Support canceling an in-progress download 2020-12-20 12:53:40 -08:00
Dane Everitt
c718da20e3
Check disk space before trying a write from the downloader; don't make empty directories if we can't even write the file 2020-12-20 11:17:53 -08:00
Dane Everitt
9c53436470
Check disk before even trying to run the download 2020-12-20 11:08:01 -08:00
Dane Everitt
17daa2071f
Update base logic for handling server file downloads 2020-12-20 10:59:07 -08:00
Dane Everitt
3495fb1c76
Less racey logic for resource usage 2020-12-16 22:03:35 -08:00
Dane Everitt
0c93e5ed02
Properly handle decoding paths 2020-12-16 21:38:56 -08:00
Dane Everitt
59a111de39
Invite our lord and savior emperror back to the table 2020-12-15 21:56:53 -08:00
Dane Everitt
c0a641247b
Different handling of errors on routes; push towards using middleware 2020-12-15 21:53:34 -08:00
Dane Everitt
057cdbd927
Use the underlying error 2020-12-15 21:14:20 -08:00
Dane Everitt
0ecc166dcd
Update error reporting middleware 2020-12-15 21:08:00 -08:00
Dane Everitt
3a26a5d39d
Convert all filesystem error types into the same Error struct 2020-12-15 20:51:13 -08:00
Dane Everitt
9ae75a399b
Update middleware.go 2020-12-15 20:20:47 -08:00
Dane Everitt
01b766dacc
Remove dupe 2020-12-15 20:20:22 -08:00
Dane Everitt
904e0a574d
Merge branch 'develop' of https://github.com/pterodactyl/wings into develop 2020-12-15 20:20:16 -08:00
Dane Everitt
acd6dc62d0
Update middleware logic 2020-12-15 20:19:09 -08:00
Caleb
8f26c31df6
Support downloading remote files to a server via the API
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2020-12-15 19:59:18 -08:00
Matthew Penner
e936f22419 Tweaks to server transfer logging 2020-12-11 17:24:35 -07:00
Dane Everitt
73f1399e47
Don't expect double-encoded values here 2020-12-08 21:24:31 -08:00
Dane Everitt
bcf0c72e47
Correctly report errors to admin users over the websocket; closes pterodactyl/panel#2709 2020-12-06 15:10:08 -08:00
Matthew Penner
169e8b8f8b Fix chmod endpoint mode value 2020-11-29 13:48:15 -07:00
Matthew Penner
c6e2889075 Fix chmod endpoint 2020-11-29 13:44:28 -07:00
Matthew Penner
f62f714863 Add chmod endpoint to server files 2020-11-29 13:07:45 -07:00
Dane Everitt
97345123ce
Merge branch 'develop' of https://github.com/pterodactyl/wings into develop 2020-11-29 11:48:03 -08:00
Dane Everitt
8aa9105ed3
Make paths lowercase for cert serving; closes pterodactyl/panel#2745 2020-11-29 11:47:52 -08:00
Matthew Penner
e8088f85d0 Lets not try to log the server ID twice 2020-11-29 12:35:02 -07:00
Matthew Penner
0c8476c79b Cleanup router/router_transfer.go 2020-11-29 12:33:44 -07:00
Matthew Penner
a7a66e8bc0 Notify panel of failed archive generation when transferring a server 2020-11-29 12:31:54 -07:00
Matthew Penner
65a861a9b6 Remove temporary transfer archives; closes https://github.com/pterodactyl/panel/issues/2742 2020-11-28 17:00:52 -07:00
Matthew Penner
de51fd1c51
Error handling improvements (#71)
* Remove `emperror.dev/errors`, remove all `errors#Wrap` and `errors#WithStack` calls
* Improve logging in `server/backup.go`
2020-11-28 16:57:10 -07:00
Matthew Penner
73b221d022 Switch old Server#GetState() calls over to Server#Environment#State() 2020-11-20 14:35:29 -07:00
Dane Everitt
20ece60a72
Fix files not being editable correctly in the panel; closes pterodactyl/panel#2679 2020-11-08 17:06:40 -08:00
Dane Everitt
68bdcb3cbc
Fix error handling and get tests back to working 2020-11-08 15:15:39 -08:00
Dane Everitt
be9d1a3986
Replace error handling package with emperror; add better reporting for errors escaping server root 2020-11-08 13:52:20 -08:00