Protect against zip bombs; closes pterodactyl/panel#883

This commit is contained in:
Dane Everitt
2020-09-17 20:37:34 -07:00
parent 6b25ac3665
commit 6ba49df485
2 changed files with 8 additions and 3 deletions

View File

@@ -29,6 +29,8 @@ import (
// Error returned when there is a bad path provided to one of the FS calls.
type PathResolutionError struct{}
var ErrNotEnoughDiskSpace = errors.New("not enough disk space is available to perform this operation")
// Returns the error response in a string form that can be more easily consumed.
func (pre PathResolutionError) Error() string {
return "invalid path resolution"