Backup restore failure when from external storage medium
What does this MR do and why?
This removes redundant path traversal checks for users restoring backups. We already check to make sure the source backup directory is within the user's defined server backup dir. We do not need to validate a transversal again.
This was also an invalid traversal check as it was validating against Crafty's default backup directory and not the super user defined backup directory.
Related to issue #105 (closed)
How to set up and validate locally
Create a backup in your backup section of Crafty using the default backup location. Restore the backup. This should restore properly.
Change your backup location to be a directory outside of Crafty's root directory. Restore your backup. This will hang. If you right click on your page and click inspect you will notice a red-highlighted 500 error. When checking logs you will note an error stating a path transversal is detected.
After pulling this branch and attempting the above operations again both will complete successfully.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
Have you checked this doesn't interfere/conflict/duplicate someone elses work? -
Have you fully tested your changes? -
Have you resolved any lint issues? -
Have you assigned a reviewer? -
Have you applied correct labels? -
Have you updated CHANGELOG.md?
Merge request reports
Activity
added Bug ~22961862 labels
assigned to @Zedifus
mentioned in commit a2c59eba
added 5 commits
-
ea24215e...0a267974 - 3 commits from branch
dev
- 795f72a7 - Merge branch 'dev' into bug/backup-external-restore
- a2c59eba - Update changelog !390 (merged)
-
ea24215e...0a267974 - 3 commits from branch
mentioned in commit 5ce49d47
requested review from @Zedifus
mentioned in merge request !396 (merged)