Commit Graph

79 Commits

Author SHA1 Message Date
Matthew Penner
93664fd112
router: add additional fields to remote file pull 2022-02-23 15:03:15 -07:00
Matthew Penner
3a738e44d6
run gofumpt 2022-02-23 15:02:19 -07:00
Noah van der Aa
067ca5bb60
Actually enforce upload file size limit (#122) 2022-02-21 14:59:28 -08:00
Dane Everitt
ec57f43dd4 Add deprecation flag on the directory, don't remove it entirely 2021-08-02 20:15:25 -07:00
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
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
Daniel Barton
4ed0bf522b Quote and escape Content-Disposition header 2021-02-21 15:05:43 +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
56af6fc1f8
Correctly abort on file missing without panic 2021-01-21 20:58:40 -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
f6669213e8
Begin refactoring and improving the middleware 2021-01-16 11:02:57 -08:00
Dane Everitt
e9e70b6081
Better error handling; skip file when unarchiving 2021-01-10 17:01:41 -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
Jakob Schrettenbrunner
8192244fec replace servers.servers singleton with server.Manager 2021-01-10 02:37:02 +01: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
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
0a45ea44a4 Return a user-friendly error for an invalid file mode 2020-12-25 14:41:38 -07: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
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
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
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
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
Dane Everitt
73f1399e47
Don't expect double-encoded values here 2020-12-08 21:24:31 -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
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
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
be9d1a3986
Replace error handling package with emperror; add better reporting for errors escaping server root 2020-11-08 13:52:20 -08:00
Dane Everitt
384b9a3c28
Correctly report errors when uploading files 2020-11-01 16:33:02 -08:00
Dane Everitt
9b7c0fb7f3
Steal tests from other branch that is being discarded, attempt to get at least one of them to pass; WIP 2020-09-30 21:46:32 -07:00
Dane Everitt
0f7bb1a371
Refactor filesystem to not be dependent on a server struct 2020-09-27 12:24:08 -07:00
Dane Everitt
de30e2fcc9
Dont attempt to get size within archive process, will return empty; ref pterodactyl/panel#2420
The stat call is operating against an unflushed file if called in the archive function, so you'll just get the emtpy archive size, rather than the final size.

Plus, we only used the file stat in one place, so slight efficiency win?
2020-09-27 11:16:38 -07:00
Dane Everitt
0b9ad3de05
More file size confirmations before performing some actions; closes pterodactyl/panel#2420 2020-09-26 16:02:41 -07:00
Dane Everitt
2cc06e0528
closes pterodactyl/panel#2413 2020-09-25 19:23:31 -07:00