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

Renaming a resource to banned name is allowed #1295

Closed
haribhandari07 opened this issue May 19, 2020 · 5 comments
Closed

Renaming a resource to banned name is allowed #1295

haribhandari07 opened this issue May 19, 2020 · 5 comments
Labels
Category:Defect Existing functionality is not working as expected Type:Bug

Comments

@haribhandari07
Copy link
Contributor

haribhandari07 commented May 19, 2020

Description

Renaming a file or folder to the banned name for eg; \name is not forbidden

Steps to reproduce:

  1. upload a file curl -X PUT -uadmin:admin -k https://localhost:9200/remote.php/webdav/file1.txt -d"123"
  2. rename the file curl -X MOVE -uadmin:admin -k https://localhost:9200/remote.php/webdav/file1.txt -H "Destination: https://localhost:9200/remote.php/webdav/\file1.txt" -v
  3. list files: curl -X PROPFIND -uadmin:admin -k https://localhost:9200/remote.php/webdav | xmllint --format -

a file with the name <d:href>/remote.php/webdav/%5cfile1.txt</d:href> is listed

It's also possible to upload a file with that name:
curl -X PUT -uadmin:admin -k https://localhost:9200/remote.php/webdav/%5cfile2.txt -d"123"

The same behavior is noticed for the folder.

@individual-it
Copy link
Member

on EOS storage the renaming does not work, but the return code is 500 and not 400 as it should be

@butonic butonic transferred this issue from owncloud/ocis-reva Jan 18, 2021
@refs
Copy link
Member

refs commented Jan 18, 2021

confirm it still occurs with the latest master.

@refs refs added good first issue Type:Bug Category:Defect Existing functionality is not working as expected labels Jan 18, 2021
@settings settings bot removed the p3-medium label Apr 7, 2021
@pascalwengerter
Copy link
Contributor

Where is a banned name configured?

@individual-it
Copy link
Member

I think the thought is that filenames with a \ will get us into trouble on windows systems
I've updated the original post to make it easier to reproduce.
also web happily uploads a file with a \ in its name, but it cannot download such a file again

If a \ is a legal character in a files name then the issue needs to be moved to web, if not creating such files need to be prevented

@phil-davis
Copy link
Contributor

Fixed by cs3org/reva#1900
And by the reva update to OCIS: #2334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Defect Existing functionality is not working as expected Type:Bug
Projects
None yet
Development

No branches or pull requests

5 participants