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

"#" sign in directory name causes error by uploading files inside it #9247

Closed
elizavetaRa opened this issue Jun 15, 2023 · 2 comments · Fixed by #9290
Closed

"#" sign in directory name causes error by uploading files inside it #9247

elizavetaRa opened this issue Jun 15, 2023 · 2 comments · Fixed by #9290
Assignees
Labels
Early-Adopter:CERN Type:Bug Something isn't working

Comments

@elizavetaRa
Copy link
Member

Steps to reproduce

  1. Create a directory and name it "test with # folder"
  2. Open directory
  3. Upload a file

Expected behaviour

File gets uploaded

Actual behaviour

Request call POST
https://ocis.ocis-traefik.latest.owncloud.works/remote.php/dav/spaces/0ef049e8-a2a9-4d3d-9aec-3ad647a0e1e9$1cd70506-913a-4f89-bf4c-923e354ce128/test with : starting with "#" url gets cut.

At CERNBox request call PUT https://cernbox.cern.ch/remote.php/dav/files/ragozina/eos/user/r/ragozina/test with returns 204 and creates a file "test with" in parent directory.

Possibly the same bug for some other signs?

@elizavetaRa elizavetaRa added Type:Bug Something isn't working Early-Adopter:CERN labels Jun 15, 2023
@dschmidt
Copy link
Member

Can you "copy as cURL" the failing request from the developer tools?

@elizavetaRa
Copy link
Member Author

  curl 'https://ocis.ocis-traefik.latest.owncloud.works/remote.php/dav/spaces/0ef049e8-a2a9-4d3d-9aec-3ad647a0e1e9$1cd70506-913a-4f89-bf4c-923e354ce128/test%20with%20' \
  -H 'authority: ocis.ocis-traefik.latest.owncloud.works' \
  -H 'accept: */*' \
  -H 'accept-language: en' \
  -H 'authorization: Bearer eyJhbGciOiJQUzI1NiIsImtpZCI6InByaXZhdGUta2V5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJ3ZWIiLCJleHAiOjE2ODY4MzY4NDYsImlhdCI6MTY4NjgzNjU0NiwiaXNzIjoiaHR0cHM6Ly9vY2lzLm9jaXMtdHJhZWZpay5sY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8HjHssQuoHKNlwuj_BneZSvGI' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/offset+octet-stream' \
  -H 'origin: https://ocis.ocis-traefik.latest.owncloud.works' \
  -H 'pragma: no-cache' \
  -H 'referer: https://ocis.ocis-traefik.latest.owncloud.works/files/spaces/personal/admin/test%20with%20%23%20folder?fileId=0ef049e8-a2a9-4d3d-9aec-3ad647a0e1e9%241cd70506-913a-4f89-bf4c-923e354ce128%21ca4f1581-7042-437d-9f50-09967737383d&items-per-page=10&view-mode=resource-table&tiles-size=1' \
  -H 'sec-ch-ua: "Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'tus-resumable: 1.0.0' \
  -H 'upload-length: 383095' \
  -H 'upload-metadata: spaceId MGVmMDQ5ZTgtYTJhOS00ZDNkLTlhZWMtM2FkNjQ3YTBlMWU5JDFjZDcwNTA2LTkxM2EtNGY4OS1iZjRjLTkyM2UzNTRjZTEyOA==,spaceName UGVyc29uYWw=,driveAlias cGVyc29uYWwvYWRtaW4=,driveType cGVyc29uYWw=,currentFolder L3Rlc3Qgd2l0aCAjIGZvbGRlcg==,currentFolderId MGVmMDQ5ZTgtYTJhOS00ZDNkLTlhZWMtM2FkNjQ3YTBlMWU5JDFjZDcwNTA2LTkxM2EtNGY4OS1iZjRjLTkyM2UzNTRjZTEyOCFjYTRmMTU4MS03MDQyLTQzN2QtOWY1MC0wOTk2NzczNzM4M2Q=,uppyId dXBweS1rYXR6ZS8xL3BuZy0xZC0xZS1pbWFnZS9wbmctMzgzMDk1LTE2NjkzODQ2NDYwMDA=,relativeFolder ,relativePath dW5kZWZpbmVk,tusEndpoint aHR0cHM6Ly9vY2lzLm9jaXMtdHJhZWZpay5sYXRlc3Qub3duY2xvdWQud29ya3MvcmVtb3RlLnBocC9kYXYvc3BhY2VzLzBlZjA0OWU4LWEyYTktNGQzZC05YWVjLTNhZDY0N2EwZTFlOSQxY2Q3MDUwNi05MTNhLTRmODktYmY0Yy05MjNlMzU0Y2UxMjgvdGVzdCB3aXRoICMgZm9sZGVy,uploadId N2M5N2ZiNjMtOWU3NS00NjhhLWFlMjYtNTg2NjVjZmI1ZWI4,topLevelFolderId dW5kZWZpbmVk,routeName ZmlsZXMtc3BhY2VzLWdlbmVyaWM=,routeDriveAliasAndItem cGVyc29uYWwvYWRtaW4vdGVzdCB3aXRoICMgZm9sZGVy,routeShareId ,name S2F0emUtMS5wbmc=,type aW1hZ2UvcG5n,mtime MTY2OTM4NDY0Ng==,filetype aW1hZ2UvcG5n,filename S2F0emUtMS5wbmc=' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36' \
  -H 'x-request-id: 067f87b2-9cd7-4984-9af5-ecb193999d6b' \
  --data-raw $'\u0089PNG\r\n\u001a\n\u0000\u0000\u0000\rIHDR\u0000\u0000\u0006v\u0000\u000....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Early-Adopter:CERN Type:Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants