owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
429 stars 160 forks source link

Redirect / resolving of some id-only based URL schemes broken #9269

Closed michaelstingl closed 9 months ago

michaelstingl commented 1 year ago
### Steps to reproduce 1. Login `einstein:relativity@ocis.ocis-traefik.latest.owncloud.works` 2. Upload folder `Hacker-Songs` in `Personal` Space 3. Open `Hacker-Songs` 4. Copy browser URL https://ocis.ocis-traefik.latest.owncloud.works/files/spaces/personal/einstein/Hacker-Songs?fileId=96fd1fa6-2d2a-4701-be6e-7d15a82ecd95%244c510ada-c86b-4815-8820-42cdf82c3d51%2101275b1d-f963-497e-9e76-7a46cf71d72b&items-per-page=100&view-mode=resource-table&tiles-size=1 5. Id-only based URL as described in [`ADR-11`](https://owncloud.dev/ocis/adr/0011-global-url-format/#configurable-path-component-in-urls) doesn't work https://ocis.ocis-traefik.latest.owncloud.works/files?fileId=96fd1fa6-2d2a-4701-be6e-7d15a82ecd95%244c510ada-c86b-4815-8820-42cdf82c3d51%2101275b1d-f963-497e-9e76-7a46cf71d72b ➡️ Opens in `Personal` Space ⚠️ 6. Also https://ocis.ocis-traefik.latest.owncloud.works/files/spaces?fileId=96fd1fa6-2d2a-4701-be6e-7d15a82ecd95%244c510ada-c86b-4815-8820-42cdf82c3d51%2101275b1d-f963-497e-9e76-7a46cf71d72b ➡️ Opens in `Personal` Space ⚠️ 7. But https://ocis.ocis-traefik.latest.owncloud.works/files/spaces/personal?fileId=96fd1fa6-2d2a-4701-be6e-7d15a82ecd95%244c510ada-c86b-4815-8820-42cdf82c3d51%2101275b1d-f963-497e-9e76-7a46cf71d72b ➡️ Opens in `Hacker-Songs` in `Personal` Space ✅ 8. Also oC10-style private link https://ocis.ocis-traefik.latest.owncloud.works/f/96fd1fa6-2d2a-4701-be6e-7d15a82ecd95$4c510ada-c86b-4815-8820-42cdf82c3d51%2101275b1d-f963-497e-9e76-7a46cf71d72b ➡️ Opens fine in `Hacker-Songs` in `Personal` Space ✅ ### Expected behaviour All id-only based URLs should properly open. ### Actual behaviour Some id-only based URLs doesn't open properly. ### Environment ownCloud Infinite Scale **Version:** ``` [Log] ownCloud Web UI 7.0.1 (index.html-d302d856.mjs, line 7) [Log] Infinite Scale 3.1.0-next.1+01c936eae Community (index.html-d302d856.mjs, line 7) ``` ### Client configuration **Browser:** Safari 16.5 **Operating system:** macOS Ventura 13.4 @kulmann
michaelstingl commented 1 year ago

@micbar @tbsbdr how does the URL in an OCIS activity mail notification look like?

micbar commented 1 year ago

Share

Hello Marie Skłodowska Curie

Admin has shared "Neuer Ordner" with you.

Click here to view it: https://ocis.ocis-wopi.latest.owncloud.works/files/shares/with-me

---
ownCloud - Store. Share. Work.
https://owncloud.com/

Space

Hello Marie Skłodowska Curie,

Admin has invited you to join "Mars".

Click here to view it: https://ocis.ocis-wopi.latest.owncloud.works/f/e8bb1ac8-0fdd-413b-a6ed-ebc79e057b77$8d424a4e-df7a-4e6a-9ffd-8a61d96aa212

---
ownCloud - Store. Share. Work.
https://owncloud.com/
JammingBen commented 1 year ago

Id-only based URLs look like this: https://<host>/f/<resource_id>. I don't not why it differs from the ADR specified in https://owncloud.dev/ocis/adr/0011-global-url-format/#configurable-path-component-in-urls, however, I'm not aware of any plans to change that in the future. (Note that the wording in this section of the ADR is "could" and "would", so it sounds like these are just suggestions?). @michaelstingl does that work for you?

michaelstingl commented 1 year ago

@michaelstingl does that work for you?

PO / PM decision @tbsbdr

micbar commented 1 year ago

@JammingBen @michaelstingl I was under the impression that This URL https://ocis.ocis-wopi.latest.owncloud.works/files/spaces/project/neuer-space/Neuer%20Ordner?fileId=3dcbbe99-aaab-4fd7-96cf-fd4422a2847d%2434d61e97-cbbd-492c-8f20-3a90db4b2bf8%212942948a-6e18-4edb-8d38-03104994376c&sort-by=name&sort-dir=asc&scrollTo=Neue%20Datei.txt&tiles-size=2&items-per-page=100&view-mode=resource-table

should work without the path prefix

https://ocis.ocis-wopi.latest.owncloud.works/files/spaces/?fileId=3dcbbe99-aaab-4fd7-96cf-fd4422a2847d%2434d61e97-cbbd-492c-8f20-3a90db4b2bf8%212942948a-6e18-4edb-8d38-03104994376c&sort-by=name&sort-dir=asc&scrollTo=Neue%20Datei.txt&tiles-size=2&items-per-page=100&view-mode=resource-table

JammingBen commented 1 year ago

No that doesn't work. I'm only aware of the following 2 ways:

micbar commented 1 year ago

ah, ok

This seems we need to clean up the ADR

kulmann commented 1 year ago

... it was intended to support an auto-redirect of id-only to path and id. Missing path and wrong path should be treated the same way: resolve to the correct path and id combination.

Seems like we only support the correction of a wrong path at the moment.

However, the private link /f/fileid has nothing to do with that and should and will always work.

JammingBen commented 1 year ago

Okay, so that means we treat this as a bug or an enhancement...?

kulmann commented 1 year ago

Okay, so that means we treat this as a bug or an enhancement...?

bug :-)