-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copying a file from within a public link folder to "/" overwrites the parent folder #1230
Comments
@butonic I doble checked it. it still relevant and we have test for that: second case BREAKS data
|
Also the public link is still existing and can be accessed (expectation: error message "An error occured while loading the public link") |
This also works the other way around: If you have a folder inside that public share and copy a file using the folders name as target, it will also kill the folder & its contents. 🥳 trying to fix this aswell.... |
After discussion with @individual-it and @2403905 the overwriting of child items is expected. But the initial issue also applies for |
@dragonchaser I noticed this behavior:
curl -XCOPY "https://localhost:9200/remote.php/dav/public-files/BzAzalNWGXrTnFk/child" \
-H"DESTINATION: https://localhost:9200/remote.php/dav/public-files/BzAzalNWGXrTnFk/child" < HTTP/1.1 204 No Content Result: Is this the expected behavior? |
I think this request should fail because:
and even if we allow to overwrite itself the data should not be lost @saw-jan could you check the behavior
and then create a new issue |
the behavior is not a regression because it was there since ages COPY to same FILE:
COPY to same FOLDER:
With |
I suppose that "COPY to same FOLDER" should always return 204 (indicating that it worked) and in the storage it can actually just do nothing, because the required destination data (folder/file tree) is already there (it is both the source and destination). I guess that would be easy to implement at some reasonably high level when processing the incoming request - detect that the request is really "a silly NO-OP", just check that the source folder does exist, do not touch the storage, return 204. |
IMHO this should be a new issue, can we have a chat about this tomorrow after standup? |
issue created in #8711 |
Description
When we copy file within a public link folder to a file with unusual destination names like the same file name or with no name, then the behaviour in core and ocis are different.
Steps to reproduce:
Alice
Alice
creates a folderPARENT
Alice
uploads a file with contentsome data
toPARENT/testfile.txt
Alice
creates a public link share with pathPARENT
and permissionsread,update,create,delete
[User gets a token in the response eg:mVwPFKlJKNDOSx8]
In OC:
testfile.txt
to "testfile.txt" or to " " using new public webdav apiIn Ocis:
testfile.txt
to " " using new public webdav apiThe text was updated successfully, but these errors were encountered: