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

Add space reference to public link #11073

Closed
wants to merge 1 commit into from
Closed

Add space reference to public link #11073

wants to merge 1 commit into from

Conversation

erikjv
Copy link
Collaborator

@erikjv erikjv commented Jul 28, 2023

Fixes: #10845

@erikjv erikjv marked this pull request as draft July 28, 2023 15:10
@erikjv
Copy link
Collaborator Author

erikjv commented Jul 28, 2023

This produces:

23-07-28 16:52:19:339 [ info gui.socketapi ]:	Received SocketAPI message <-- "COPY_PUBLIC_LINK:/Users/erik/ownCloud - Katherine Johnson@ocis.owncloud.com4/Personal/untitled folder/asdf.txt" from SocketApiSocket(0x603000e41030)
23-07-28 16:52:19:339 [ debug gui.socketapi.publiclink ]	[ OCC::GetOrCreatePublicLinkShare::run ]:	Fetching shares
23-07-28 16:52:19:340 [ info sync.networkjob ]:	Created OCC::JsonApiJob(OCC::Account("Katherine Johnson@ocis.owncloud.com"), "https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?path=%2Funtitled folder%2Fasdf.txt&reshares=true&space_ref=166d1210-cdb9-50ab-9f1e-ecb9ef12a304%24534bb038-6f9d-4093-946f-133be61fa4e7&format=json", "GET", Original-Request-ID: "b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90", X-Request-ID: "b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90") for OCC::ShareManager(0x60b0002c08a0)
23-07-28 16:52:19:340 [ info sync.httplogger ]:	"b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90: Request: GET https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?path=%2Funtitled folder%2Fasdf.txt&reshares=true&space_ref=166d1210-cdb9-50ab-9f1e-ecb9ef12a304%24534bb038-6f9d-4093-946f-133be61fa4e7&format=json Header: { OCS-APIREQUEST: true, Authorization: Bearer [redacted], User-Agent: Mozilla/5.0 (Macintosh) mirall/5.0.0-git (ownCloud, macos-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64), Accept: */*, Accept-Language: en_DE, X-Request-ID: b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90, Original-Request-ID: b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90, } Data: []"
23-07-28 16:52:19:387 [ info sync.httplogger ]:	"b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90: Response: GET 200 (46ms) https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?path=%2Funtitled folder%2Fasdf.txt&reshares=true&space_ref=166d1210-cdb9-50ab-9f1e-ecb9ef12a304%24534bb038-6f9d-4093-946f-133be61fa4e7&format=json Header: { Content-Length: 74, Content-Type: application/json; charset=utf-8, Date: Fri, 28 Jul 2023 14:52:19 GMT, Ocs-Api-Version: 1, Referrer-Policy: strict-origin-when-cross-origin, Strict-Transport-Security: max-age=315360000; preload, Vary: Origin, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-Xss-Protection: 0, } Data: [{\"ocs\":{\"meta\":{\"status\":\"ok\",\"statuscode\":100,\"message\":\"OK\"},\"data\":[]}}]"
23-07-28 16:52:19:387 [ debug gui.sharing ]	[ OCC::ShareManager::fetchShares(const QString &, const QString &)::(anonymous class)::operator() ]:	Fetched 0 shares
23-07-28 16:52:19:387 [ debug gui.sharing ]	[ OCC::ShareManager::fetchShares(const QString &, const QString &)::(anonymous class)::operator() ]:	Sending  0 shares
23-07-28 16:52:19:387 [ debug gui.socketapi.publiclink ]	[ OCC::GetOrCreatePublicLinkShare::sharesFetched ]:	Creating new share
23-07-28 16:52:19:388 [ info sync.networkjob ]:	Created OCC::JsonApiJob(OCC::Account("Katherine Johnson@ocis.owncloud.com"), "https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?format=json", "POST", Original-Request-ID: "64ba3a19-eb98-40f7-8344-7ddfe39eb42e", X-Request-ID: "64ba3a19-eb98-40f7-8344-7ddfe39eb42e") for OCC::ShareManager(0x60b0002c08a0)
23-07-28 16:52:19:388 [ debug sync.networkjob ]	[ OCC::AbstractNetworkJob::slotFinished ]:	Network job finished OCC::JsonApiJob(OCC::Account("Katherine Johnson@ocis.owncloud.com"), "https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?path=%2Funtitled folder%2Fasdf.txt&reshares=true&space_ref=166d1210-cdb9-50ab-9f1e-ecb9ef12a304%24534bb038-6f9d-4093-946f-133be61fa4e7&format=json", "GET", Original-Request-ID: "b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90", X-Request-ID: "b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90")
23-07-28 16:52:19:389 [ info sync.httplogger ]:	"64ba3a19-eb98-40f7-8344-7ddfe39eb42e: Request: POST https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?format=json Header: { Content-Type: application/x-www-form-urlencoded; charset=UTF-8, OCS-APIREQUEST: true, Authorization: Bearer [redacted], User-Agent: Mozilla/5.0 (Macintosh) mirall/5.0.0-git (ownCloud, macos-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64), Accept: */*, Accept-Language: en_DE, X-Request-ID: 64ba3a19-eb98-40f7-8344-7ddfe39eb42e, Original-Request-ID: 64ba3a19-eb98-40f7-8344-7ddfe39eb42e, Content-Length: 162, } Data: [path=%2Funtitled%20folder%2Fasdf.txt&shareType=3&name=Context%20menu%20share&space_ref=166d1210-cdb9-50ab-9f1e-ecb9ef12a304%24534bb038-6f9d-4093-946f-133be61fa4e7]"
23-07-28 16:52:19:419 [ info sync.httplogger ]:	"64ba3a19-eb98-40f7-8344-7ddfe39eb42e: Response: POST 200 (29ms) https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?format=json Header: { Content-Length: 89, Content-Type: application/json; charset=utf-8, Date: Fri, 28 Jul 2023 14:52:19 GMT, Ocs-Api-Version: 1, Referrer-Policy: strict-origin-when-cross-origin, Strict-Transport-Security: max-age=315360000; preload, Vary: Origin, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-Xss-Protection: 0, } Data: [{\"ocs\":{\"meta\":{\"status\":\"error\",\"statuscode\":400,\"message\":\"Can not share space root\"}}}]"
23-07-28 16:52:19:420 [ warning gui.socketapi.publiclink ]:	Share fetch/create error 400 "Can not share space root"

@TheOneRing Any idea what's wrong with the request?

@erikjv erikjv self-assigned this Jul 28, 2023
@TheOneRing
Copy link
Member

I'd prefer it if you'd not use the ShareManager as the code is pretty rotten ShareManager

@michaelstingl
Copy link
Contributor

michaelstingl commented Aug 2, 2023

23-07-28 16:52:19:340 [ info sync.httplogger ]: "b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90: Request: GET https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?path=%2Funtitled folder%2Fasdf.txt&reshares=true&space_ref=166d1210-cdb9-50ab-9f1e-ecb9ef12a304%24534bb038-6f9d-4093-946f-133be61fa4e7&format=json Header: { OCS-APIREQUEST: true, Authorization: Bearer [redacted], User-Agent: Mozilla/5.0 (Macintosh) mirall/5.0.0-git (ownCloud, macos-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64), Accept: */*, Accept-Language: en_DE, X-Request-ID: b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90, Original-Request-ID: b642efc9-75f2-4e8f-9e7e-7cd17f2b2e90, } Data: []"

@erikjv ocis.owncloud.com doesn't include the latest backend fixes:

[Log]  ownCloud Web UI 7.0.0  (index.html-c4b478e4.mjs, line 7)
[Log]  Infinite Scale 3.0.0 Community  (index.html-c4b478e4.mjs, line 7)

I'd recommend to use the latest daily deployments for client testing:

[Log]  ownCloud Web UI 7.1.0-rc.4  (index.html-25ddd689.mjs, line 7)
[Log]  Infinite Scale 3.1.0-beta.1+d65476ff0 Community  (index.html-25ddd689.mjs, line 7)

@TheOneRing
Copy link
Member

Superseded by #11079

@TheOneRing TheOneRing closed this Aug 11, 2023
@TheOneRing TheOneRing deleted the work/space_ref branch August 11, 2023 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide space_ref to share requests when using spaces
3 participants