[SVCS-133] Reject complicated self-overwrites#341
Open
NyanHelsing wants to merge 3 commits intoCenterForOpenScience:developfrom
Open
[SVCS-133] Reject complicated self-overwrites#341NyanHelsing wants to merge 3 commits intoCenterForOpenScience:developfrom
NyanHelsing wants to merge 3 commits intoCenterForOpenScience:developfrom
Conversation
cslzchen
reviewed
May 29, 2018
Contributor
There was a problem hiding this comment.
LGTM 🎆
@birdbrained I will rebase/squash/reword commits, remove three merge ones and then push back to the PR.
Contributor
|
Update: given that your changes are only style fixes (including fixing issues introduced by yourself), I cherry-picked and rebased the full PR into 2 commits, one from Addison and one from you. I removed several unnecessary style updates as well. Your original PR is backed up in this branch. Original Commits:New Commits: |
0d24d2a to
5aae000
Compare
cslzchen
approved these changes
May 29, 2018
Contributor
There was a problem hiding this comment.
Works as expected locally. Commits are cherry-picked and rebased to the latest develop branch 🎆 🎆 . Ready for final review @felliott . The ticket has a detailed config of local integration tests. Below is a screenshot of my local one with the Box provider.
9a45b46 to
353c348
Compare
Fixing an issue where it is possible to silently delete files when a child component is hooked up to a project and they share the same provider.
5802ec9 to
a2d4f2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Update: PR description modified by @cslzchen
Ticket
https://openscience.atlassian.net/browse/SVCS-133
Purpose
Replaces: #270
As per the instructions on the linked ticket, it is possible to silently cause files to delete themselves during intra copy/move actions. This ticket fixes this issue on the following providers it affects:
Summary of Changes
Added Code to check the full path, or identifiers of the source and destination. If they overlap (are the same) the move/copy is rejected with a 409 and an error message that "files cannot overwrite themselves".
Added and updated tests to the affected providers.
Tests and QA Notes
There are testing notes on the ticket for how to properly recreate the issue.
For the 4 providers listed, copy/move with replace/keep both and rename should all be tested extensively. They should be tested with and without the setup for the bug in place
Light testing on other addons/providers should also be done.