Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
Fix error when deleting a file, closes pterodactyl/panel#587
Browse files Browse the repository at this point in the history
  • Loading branch information
DaneEveritt committed Aug 17, 2017
1 parent b83c5b4 commit 45284bf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Changelog
This file is a running track of new features and fixes to each version of the daemon released starting with `v0.2.0`.

## v0.4.4
## v0.4.5
### Fixed
* Fixes a bug that caused newly created nodes to fail during the server creation process due to a missing timezone file location in the configuration. [`#593`](https://github.com/Pterodactyl/Panel/issues/593)
* Fixes an error thrown when deleting a file via the API. [`#587`](https://github.com/Pterodactyl/Panel/issues/587)

## v0.4.4 (Candid Comodactylus)
### Fixed
* Fixes a bug with certain NGINX configurations that would cause a 404 error when attempting to access a service's configuration files.
* Should fix a bug causing servers to not be created correctly on first daemon boot due to a missing SFTP docker container.
Expand All @@ -17,7 +22,7 @@ This file is a running track of new features and fixes to each version of the da
* Added a cleaner error message if docker does not appear to be running rather than a confusing stack trace.
* Updated multiple dependencies to the latest version.

## v0.4.3
## v0.4.3 (Candid Comodactylus)
### Fixed
* Fixes a bug that would throw a `setStatus` undefined error when deleting a failed install server.
* Fixes bug in private registry verification function that wasn't using authentication correctly on wildcards.
Expand All @@ -26,7 +31,7 @@ This file is a running track of new features and fixes to each version of the da
* Updated Socket.io to v2.0.3, will require `[email protected]` as a minimum supported version to work correctly.
* Updated dependencies to latest versions as well as verified support for Nodejs v8.

## v0.4.2
## v0.4.2 (Candid Comodactylus)
### Fixed
* Fixes security hole which set the active socket permissions to the last user to request the socket, potentially allowing users without permissions to access different console options.

Expand Down
18 changes: 9 additions & 9 deletions src/controllers/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,16 @@ class FileSystem {
}

Fs.remove(this.server.path(path), next);
}

Async.eachOfLimit(path, 5, (value, key, callback) => {
// Safety - prevent deleting the main folder.
if (Path.resolve(this.server.path(value)) === this.server.path()) {
return next(new Error('You cannot delete your home folder.'));
}
} else {
Async.eachOfLimit(path, 5, (value, key, callback) => {
// Safety - prevent deleting the main folder.
if (Path.resolve(this.server.path(value)) === this.server.path()) {
return next(new Error('You cannot delete your home folder.'));
}

Fs.remove(this.server.path(value), callback);
}, next);
Fs.remove(this.server.path(value), callback);
}, next);
}
}

copy(initial, ending, opts, next) {
Expand Down

0 comments on commit 45284bf

Please sign in to comment.