Skip to content

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

Description

@michaelstingl

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.

Activity

  1. added
    p3-medium
    oCIS
    on Sep 9, 2021
  2. added this to the 2.10.0 milestone on Sep 9, 2021
  3. added 2 commits that reference this issue on Jun 30, 2022
    32c90e2
    ec9eed4
  4. added a commit that references this issue on Jun 30, 2022
    efa2113
  5. michaelstingl commented on Aug 5, 2022

    @michaelstingl
    ContributorAuthor

    @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
    
  6. TheOneRing commented on Aug 5, 2022

    @TheOneRing
    Contributor

    Fixed in #9964

  7. michaelstingl commented on Oct 6, 2022

    @michaelstingl
    ContributorAuthor

    @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
    
  8. TheOneRing commented on Oct 6, 2022

    @TheOneRing
    Contributor

    Please just lets kill the horrible sharing dialog

  9. added a commit that references this issue on Oct 6, 2022
    0167783
  10. added a commit that references this issue on Oct 6, 2022
    9d12406
  11. moved this to Needs Info in Desktop Testingon Oct 28, 2022
  12. moved this from Needs Info to No test needed in Desktop Testingon Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Hacktoberfestgood first issueoCISp3-medium

    Type

    No type

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions