Fix check new dav rename target path name#28735
Merged
DeepDiver1975 merged 2 commits intomasterfrom Aug 18, 2017
Merged
Conversation
Verify target path earlier to make sure 403 is returned in case of wrong target (ex: ".htaccess") instead of 404.
Contributor
Author
|
@individual-it I can't find them |
Member
|
sorry did overlooked one file in your commit |
Contributor
Author
|
stable10: #28737 |
phil-davis
approved these changes
Aug 18, 2017
DeepDiver1975
approved these changes
Aug 18, 2017
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Verify target path earlier to make sure 403 is returned in case of wrong
target (ex: ".htaccess") instead of 404.
The reason this happens is because the rename code path between old and new DAV endpoints are different. Old DAV fails earlier when Sabre's CorePlugin does a
getNodeForPath()on the target even for a local rename. New DAV doesn't go through this code path and reachedNode:setName()more directly, possibly due to the necessary changes that were done lately regarding moves.Related Issue
Fixes #28441.
Should also fix the renameFile/renameFolder failures on master.
Motivation and Context
How Has This Been Tested?
Manual testing with cadaver on new dav endpoint: rename "welcome.txt" to ".htaccess".
Before the fix: 404
After the fix: 403
Automated tests have been reenabled.
Screenshots (if appropriate):
Types of changes
Checklist: