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

Desktop client should respect "privateLinks":false from capabilities #8998

Closed
michaelstingl opened this issue Sep 9, 2021 · 4 comments · Fixed by #9840 or #10168
Closed

Desktop client should respect "privateLinks":false from capabilities #8998

michaelstingl opened this issue Sep 9, 2021 · 4 comments · Fixed by #9840 or #10168
Labels
good first issue Hacktoberfest oCIS ownCloud Infinite Scale related p3-medium Normal priority
Milestone

Comments

@michaelstingl
Copy link
Contributor

michaelstingl commented Sep 9, 2021

oCIS doesn't support private link generation yet. It's correctly announced in the /ocs/v1.php/cloud/capabilities

09-09 19:55:10:056 [ info sync.httplogger ]:	"9c38f094-d0e3-42b6-8afb-2e60c5810435: 
Response: GET 200 https://ocis.team.owncloud.works/ocs/v1.php/cloud/capabilities?format=json 
Header: { Content-Length: 1566, Content-Type: application/json; charset=utf-8, Date: Thu, 09 Sep 2021 17:55:10 GMT, Vary: Origin, } 
Data: [{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK"},"data":{"capabilities":{"core":{"pollinterval":60,"webdav-root":"remote.php/webdav","status":{"installed":true,"maintenance":false,"needsDbUpgrade":false,"version":"10.0.11.5","versionstring":"10.0.11","edition":"community","productname":"reva"},"support-url-signing":true},"checksums":{"supportedTypes":["sha1","md5","adler32"],"preferredUploadType":"SHA1"},"files":{"privateLinks":false,"bigfilechunking":false,"undelete":true,"versioning":true,"favorites":false,"blacklisted_files":[],"tus_support":{"version":"1.0.0","resumable":"1.0.0","extension":"creation,creation-with-upload","max_chunk_size":0,"http_method_override":""}},"dav":{"chunking":"","trashbin":"1.0","reports":["search-files"],"chunkingParallelUploadDisabled":false},"files_sharing":{"api_enabled":true,"resharing":true,"group_sharing":true,"auto_accept_share":true,"share_with_group_members_only":true,"share_with_membership_groups_only":true,"search_min_length":3,"default_permissions":22,"user_enumeration":{"enabled":true,"group_members_only":true},"federation":{"outgoing":true,"incoming":true},"public":{"enabled":true,"send_mail":true,"social_share":true,"upload":true,"multiple":true,"supports_upload_only":true,"password":{"enforced_for":{"read_only":true,"read_write":true,"upload_only":true},"enforced":true},"expire_date":{"enabled":false}},"user":{"send_mail":true,"profile_picture":false}},"notifications":{"ocs-endpoints":["disable"]}},"version":{"major":10,"minor":0,"micro":11,"string":"10.0.11","edition":"reva"}}}}]"
               "files":{
                  "privateLinks":false,

Request

09-09 19:42:34:258 [ info sync.httplogger ]:	"290ea688-ca6d-4323-9fe4-2f85858696c1: 
Request: PROPFIND https://ocis.team.owncloud.works/remote.php/webdav/Shares/Memes 
Header: { Depth: 0, Authorization: Bearer [redacted], User-Agent: Mozilla/5.0 (Macintosh) mirall/2.9.0 (build 5148) (testpilotcloud, osx-20.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64), Accept: */*, Content-Type: text/xml; charset=utf-8, X-Request-ID: 290ea688-ca6d-4323-9fe4-2f85858696c1, Original-Request-ID: 290ea688-ca6d-4323-9fe4-2f85858696c1, Content-Length: 142, } 
Data: [<?xml version=\"1.0\" encoding=\"utf-8\"?>
<d:propfind xmlns:d=\"DAV:\">
<d:prop>
<privatelink xmlns=\"http://owncloud.org/ns\"/>
</d:prop>M</d:propfind>\n]"

Response

09-09 19:42:34:348 [ info sync.httplogger ]:	"290ea688-ca6d-4323-9fe4-2f85858696c1: 
Response: PROPFIND 207 https://ocis.team.owncloud.works/remote.php/webdav/Shares/Memes 
Header: { Access-Control-Allow-Origin: *, Access-Control-Expose-Headers: Tus-Resumable, Tus-Version, Tus-Extension, Content-Length: 343, Content-Security-Policy: default-src 'none';, Content-Type: application/xml; charset=utf-8, Date: Thu, 09 Sep 2021 17:42:34 GMT, Dav: 1, 3, extended-mkcol, Tus-Extension: creation,creation-with-upload, Tus-Resumable: 1.0.0, Tus-Version: 1.0.0, Vary: Origin, X-Content-Type-Options: nosniff, X-Download-Options: noopen, X-Frame-Options: SAMEORIGIN, X-Permitted-Cross-Domain-Policies: none, X-Robots-Tag: none, X-Xss-Protection: 1; mode=block, } 
Data: [<?xml version=\"1.0\" encoding=\"utf-8\"?>
<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:oc=\"http://owncloud.org/ns\">
<d:response>
<d:href>/remote.php/webdav/Shares/Memes/</d:href>
<d:propstat>
<d:prop>
<oc:privatelink>
</oc:privatelink>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
</d:multistatus>]"

Version

testpilotcloud 2.9.0 (build 5148) 240687 Sep 8 2021 16:17:12
Libraries Qt 5.12.11, OpenSSL 1.1.1k 25 Mar 2021
Using virtual files plugin: suffix
osx-20.6.0

Related: owncloud/ocis#1409 (comment)


TODO:
Take #9127 as a reference on how to implement.

@michaelstingl
Copy link
Contributor Author

@TheOneRing we need to check for more occurrences:

CleanShot 2022-08-05 at 12 18 39

testpilotcloud 3.0.0.8265-daily20220805 bde1a7 Aug 5 2022 02:10:05
Libraries Qt 5.15.5, OpenSSL 1.1.1q 5 Jul 2022
Using virtual files plugin: suffix
osx-21.6.0

@michaelstingl michaelstingl reopened this Aug 5, 2022
@TheOneRing
Copy link
Member

Fixed in #9964

@michaelstingl
Copy link
Contributor Author

@TheOneRing this is show when "privateLinks":false is announced in the capabilities:

CleanShot 2022-10-06 at 17 00 53@2x

testpilotcloud 3.0.0.8697-daily20221006 0c4d4d
Libraries Qt 5.15.5, OpenSSL 1.1.1q 5 Jul 2022
Using virtual files plugin: suffix
osx-21.6.0

@michaelstingl michaelstingl reopened this Oct 6, 2022
@TheOneRing
Copy link
Member

Please just lets kill the horrible sharing dialog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Hacktoberfest oCIS ownCloud Infinite Scale related p3-medium Normal priority
Projects
No open projects
Status: No test needed
2 participants