Commit Graph

92 Commits

Author SHA1 Message Date
Geri
06614de99d
server(filesystem): handle individual compressed files (#184) 2024-05-07 22:06:15 -06:00
Matthew Penner
f1c5bbd42d
server(filesystem): allow decompressing individual files
Implements logic for handling a file that is compressed but isn't an archive.

Fixes https://github.com/pterodactyl/panel/issues/5034

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-17 14:58:30 -06:00
Matthew Penner
1c5ddcd20c
server(filesystem): handle writing empty files
Fixes https://github.com/pterodactyl/panel/issues/5038

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-17 14:58:13 -06:00
Matthew Penner
ac9bd1d95e
server(filesystem): fix archives in subdirectories
When creating an archive starting from a subdirectory instead of the
root of a server's filesystem, the walker would treat the paths as if
they where relative to the parent of the subdirectory, instead of as
descendants of the subdirectory.

Fixes https://github.com/pterodactyl/panel/issues/5030
2024-03-14 13:46:36 -06:00
Matthew Penner
979df34392
server(filesystem): fix archive creation with ignore
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-13 20:29:09 -06:00
Matthew Penner
2931430eb8
server(filesystem): fix archive skipping directories
Fixes https://github.com/pterodactyl/panel/issues/5027

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-13 15:09:24 -06:00
Matthew Penner
d1c0ca5260
server(filesystem): rebuild everything imaginable
This wonderfully large commit replaces basically everything under the
`server/filesystem` package, re-implementing essentially everything.

This is related to
https://github.com/pterodactyl/wings/security/advisories/GHSA-494h-9924-xww9

If any vulnerabilities related to symlinks persist after this commit, I
will be very upset.

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-13 12:27:29 -06:00
Daniel Barton
d1fd0465e4
server(filesystem): fix file names when extracting archives (#165) 2023-10-17 20:47:36 -06:00
guangwu
48c55af373
chore: slice loop replace (#173) 2023-10-02 17:24:17 -06:00
Matthew Penner
4d51de71c2
server(filesystem): fix test failure 2023-05-10 12:59:22 -06:00
Matthew Penner
a50e4ce9d1
go: update dependencies 2023-05-08 13:52:15 -06:00
Matthew Penner
74b1c46b7f
server(filesystem): fix archive test 2023-03-07 15:29:29 -07:00
Matthew Penner
43b3496f00
server(filesystem): fix archiver path matching
Closes https://github.com/pterodactyl/panel/issues/4630
2023-03-07 15:19:09 -07:00
Matthew Penner
429ac62dba
server(filesystem): Delete tweaks 2023-02-08 14:20:13 -07:00
Matthew Penner
dac9685298
server(filesystem): SafePath tweaks 2023-02-07 19:14:35 -07:00
Matthew Penner
14eea3b1e4
router: close body once finished 2023-01-24 12:33:42 -07:00
Matthew Penner
13d3490bcf
server(filesystem): fix Writefile being broken 2023-01-17 18:44:56 -07:00
Matthew Penner
e9b8b11fec
Ensure files are closed after they are done being used 2023-01-17 18:34:08 -07:00
Dane Everitt
ff50d0e5bd
Cleanup request error handling; properly handle os.ErrNotExist errors (#150) 2022-11-22 11:18:27 -07:00
Matthew Penner
57e7eb714c
Streaming Transfers (#153) 2022-11-14 18:25:01 -07:00
Matthew Penner
eb4df39d14
server(filesystem): fix inaccurate archive progress (#145) 2022-11-06 13:38:30 -07:00
Matthew Penner
f577f5521f
server(filesystem): fix panic with archive Progress 2022-11-04 11:24:19 -06:00
Matthew Penner
3f481e9540
chore: run gofumpt 2022-10-05 17:24:11 -06:00
Matthew Penner
6fb61261b0
server(transfers): track progress of archive creation and extraction (#143) 2022-10-04 20:35:48 -06:00
PotatoMaaan
c686992e85
backups: add an option to change gzip compression level (#128) 2022-09-25 18:47:09 -06:00
camjac251
c736c24118
it's to its (#123) 2022-09-25 13:34:28 -06:00
DaneEveritt
b1be2081eb
Better archive detection logic; try to use reflection as last ditch effort if unmatched
closes pterodactyl/panel#4101
2022-05-30 18:42:31 -04:00
DaneEveritt
f390784973
Include error in log output if one occurs during move 2022-05-21 17:01:12 -04:00
DaneEveritt
37e4d57cdf
Don't include files and folders with identical name prefixes when archiving; closes pterodactyl/panel#3946 2022-05-12 18:00:55 -04:00
DaneEveritt
1d197714df
Fix faulty handling of named pipes; closes pterodactyl/panel#4059 2022-05-07 15:53:08 -04:00
Dane Everitt
34c0db9dff Replace encoding/json with goccy/go-json for cpu and memory usage improvement
This new package has significant better resource usage, and we do a _lot_ of JSON parsing in this application, so any amount of improvement becomes significant
2022-01-23 15:17:40 -05:00
Matthew Penner
04b9ef69a1
run gofumpt 2021-11-15 10:37:56 -07:00
Matthew Penner
d8df353ce8
replace deprecated ioutil function calls 2021-11-15 10:24:52 -07:00
Matthew Penner
5cd43dd4c9
archive: keep timestamps when extracting 2021-09-01 09:54:41 -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
31ff3f8b56 server(fs): keep file mode when extracting archive 2021-07-15 15:37:38 -06:00
Matthew Penner
29b2d6826a archive: fix socket files aborting backups 2021-07-12 10:17:56 -06:00
Julien Tant
35b2c420ec add decompress tests 2021-04-25 16:44:54 -07:00
Dane Everitt
daaef5044e Correctly determine name for archive files when decompressing; closes pterodactyl/panel#3296 2021-04-25 15:36:00 -07:00
Dane Everitt
0676a82a21 Add better error handling for filesystem 2021-04-17 13:29:18 -07:00
Dane Everitt
4b244e96fb Fix .rar file decompression; closes pterodactyl/panel#3267 2021-04-17 13:13:37 -07:00
Matthew Penner
0e3778ac47 transfers: use backup archiver 2021-03-07 11:04:15 -07:00
Matthew Penner
5c56ddf5d6 fs: only mkdir and chown if not exists 2021-02-10 13:58:47 -07:00
Matthew Penner
683c766d0f fs: fix potential panic when chowning a file 2021-02-05 13:30:02 -07:00
Dane Everitt
adc0732af3
Better error handling and logging for restorations 2021-01-30 18:43:35 -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
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