Commit Graph

25 Commits

Author SHA1 Message Date
Dane Everitt
9c53436470
Check disk before even trying to run the download 2020-12-20 11:08:01 -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
3a26a5d39d
Convert all filesystem error types into the same Error struct 2020-12-15 20:51:13 -08:00
Matthew Penner
ba0a1a651e Only use the permission bits for ModeBits 2020-11-29 16:13:07 -07:00
Matthew Penner
068f41393d Return mode_bits when listing files in a directory 2020-11-29 14:20:24 -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
8081c83de4
Allow disabling disk checking with 0 value for check interval 2020-11-12 20:50:03 -08:00
Dane Everitt
de0c67d066
Re-enable disabled tests 2020-11-08 15:17:47 -08:00
Dane Everitt
68bdcb3cbc
Fix error handling and get tests back to working 2020-11-08 15:15:39 -08:00
Dane Everitt
ef999a039c
Perhaps better error stacks for backups/archives; ref #2418 2020-11-08 14:07:26 -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
Matthew Penner
56789196d4 Disable flaky test so I can test cross-platform building 2020-10-17 15:47:30 -06:00
Matthew Penner
70804dd20f Remoe stat_arm.go, make stat_linux.go with with both 32 and 64 bit systems 2020-10-17 15:45:14 -06:00
Matthew Penner
19d821aab5 Fix arm build 2020-10-17 15:41:13 -06:00
Matthew Penner
4ce35d3d17 Fix race in filesystem_test.go 2020-10-17 15:31:40 -06:00
Dane Everitt
19051c99ef
Support arm builds 2020-10-17 13:52:38 -07:00
Dane Everitt
e29789114c
Fix server disk usage not being reported properly; closes pterodactyl/panel#2445 2020-10-11 15:02:37 -07:00
Dane Everitt
244640d0c1
[security] remove "SafeJoin" function
This function was not actually safe in theory. If an unknown stat source was passed in it would be possible for a symlinked file to not be detected as a symlink, thus skipping any safe path resolutions.

This would happen if the stat source was a regular os.Stat call and not an os.Lstat call, but since there is no way to differentiate between those two in the code, it is safer to just manually apply this logic in the positions where we _know_ for certain that we're working with the results of an Lstat call.
2020-10-01 21:28:38 -07:00
Dane Everitt
e3e89a2ecc
Cover symlink attacks with test cases 2020-10-01 21:13:42 -07:00
Dane Everitt
90ae815b1d
Return tests to passing state 2020-10-01 20:40:25 -07:00
Dane Everitt
367fdfad54
Simplify copy file logic 2020-09-30 21:53:50 -07:00
Dane Everitt
ee460686d6
Make delete more synchronous 2020-09-30 21:47:42 -07: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