Skip to content
Snippets Groups Projects

Backup restore failure when from external storage medium

Merged Andrew requested to merge bug/backup-external-restore into dev

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?
Edited by Iain Powrie

Merge request reports

Pipeline #580823308 passed

Pipeline passed for a2c59eba on bug/backup-external-restore

Approved by

Merged by Iain PowrieIain Powrie 2 years ago (Jul 5, 2022 10:25pm UTC)

Merge details

  • Changes merged into dev with 5ce49d47.
  • Deleted the source branch.

Pipeline #580824728 passed

Pipeline passed for 5ce49d47 on dev

Deployed to produ‎ction‎ 2 years ago
Deployed to devel‎opment‎ 2 years ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading