Skip to content
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

Trying to restore personal file to file of share received folder returns 403 but the share file is deleted (new dav path) #10356

Open
saw-jan opened this issue Oct 21, 2024 · 0 comments
Labels

Comments

@saw-jan
Copy link
Member

saw-jan commented Oct 21, 2024

Steps to reproduce

  1. as admin, add a folder (myfolder) and a file inside it (myfolder/lorem.txt)
  2. as admin, share the folder to user demo
  3. as demo, create a same named file (lorem.txt) and delete it
  4. as demo, try to restore the deleted file to the share received folder (using new dav path)
curl -XMOVE 'https://localhost:9200/remote.php/dav/trash-bin/demo/bc1b3655-4801-4646-90a1-d39b5be6bcc7' \                                                                            
-H'Destination: https://localhost:9200/remote.php/dav/files/demo/Shares/myfolder/lorem.txt' -udemo:demo -vk
< HTTP/1.1 403 Forbidden

<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\Forbidden</s:exception>
  <s:message>Permission denied to restore</s:message>
  <s:errorcode></s:errorcode>
</d:error>

lorem.txt file in the share folder is deleted and moved to trashbin of sharer (admin) ❗

With spaces endpoint: ✔️

curl -XMOVE 'https://localhost:9200/remote.php/dav/spaces/trash-bin/14cb34c2-9a97-40d4-9cb5-c0e221bbd9cb$bca43c23-9616-465f-a433-ae001b3092fa/bc1b3655-4801-4646-90a1-d39b5be6bcc7' \
-H'Destination: https://localhost:9200/remote.php/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668/myfolder/lorem.txt' -uadmin:admin -vk
< HTTP/1.1 400 Bad Request

lorem.txt exists - no change

Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Qualification
Development

No branches or pull requests

1 participant