Merge branch 'dev' into 'master'

4.0.4-hotfix

See merge request crafty-controller/crafty-4!380
This commit is contained in:
Iain Powrie 2022-06-21 22:06:18 +00:00
commit 0c562d4979
2 changed files with 6 additions and 13 deletions

View File

@ -1,7 +1,11 @@
# Changelog
## --- [4.0.4] - 2022/06/21
## --- [4.0.4-hotfix] - 2022/06/21
### Bug fixes
- Remove bad check for backups path ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/380))
<br><br>
## --- [4.0.4] - 2022/06/21
### New features
- Add shutdown on backup feature ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/373))
- Add detection and dropdown of java versions ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/375))

View File

@ -1515,18 +1515,7 @@ class PanelHandler(BaseHandler):
max_backups = bleach.clean(self.get_argument("max_backups", None))
server_obj = self.controller.servers.get_server_obj(server_id)
if (
not backup_path
== self.helper.wtol_path(
os.path.join(self.helper.backup_path, server_obj.server_uuid)
)
and self.helper.wtol_path(self.controller.project_root) in backup_path
):
self.redirect(
"/panel/error?error=Nefarious activities detected."
" User attempted to make backup path within Crafty's root."
)
return
server_obj.backup_path = backup_path
self.controller.servers.update_server(server_obj)
self.controller.management.set_backup_config(