client icon indicating copy to clipboard operation
client copied to clipboard

Link creation inconsistent between quick action and share window

Open michaelstingl opened this issue 3 years ago • 1 comments

Pre-submission Checks

  • [X] I checked for similar issues, but could not find any. I also checked the closed issues. I could not contribute additional information to any existing issue.
  • [X] I will take the time to fill in all the required fields. I know that the bug report may be dismissed otherwise due to lack of information.

Describe the bug

oCIS capabilities confuse the 2.11 desktop sync clients: https://github.com/owncloud/ocis/issues/4445

What I notices is, that the API request for the context menu quick action is different from the share window.

Context menu quick action

CleanShot 2022-08-23 at 17 53 34

% curl \
 -H 'Ocs-APIREQUEST: true' \
 -H 'Content-Type: application/x-www-form-urlencoded' \
 -H 'Authorization: Bearer eyJhbGciOiJQUzI1NiIsImtpZCI6InByaXZhdGUta2V5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJ3ZWIiLCJleHAiOjE2NjEzNTM3MDcsImp0aSI6IjVkQ3o0QlZMVnRVVWFsWjVxMzUyUDZzcnRpYzU3alhOIiwiaWF0IjoxNjYxMjY3MzA3LCJpc3MiOiJodHRwczovL29jaXMub3duY2xvdWQuY29tIiwic3ViIjoiQnpiXzY5Q1hUam9oR1JPTkBYaVlGZ2NITmR1dlFxejA1bXJOUllXdHRzNmJWYWRVM3U1bWZscTBxLUtQbzRRVmlTakJtNHYxeUlpcnE4dWJKNlVvZGdRIiwibGcudCI6IjEiLCJzY3AiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCIsImxnLmkiOnsiZG4iOiJLYXRoZXJpbmUgSm9obnNvbiIsImlkIjoidWlkPWthdGhlcmluZSxvdT11c2VycyxvPWxpYnJlZ3JhcGgtaWRtIiwidW4iOiJrYXRoZXJpbmUifSwibGcucCI6ImlkZW50aWZpZXItbGRhcCJ9.vFX9wKgHVpsXiNgOsOeq8WFIdNw_0IXRyk7oOYk33h1KvFOl_PAwV_zZxtG24CJ6wdOCCGQDsNg5G5wRrIssZXSKLkVhKV8GSIndyhwFoRgMsJYXC5odWr2XPB8BjT7yIREol0nUb0RHNNX7qGAS53OVzouzuLcziPJp-xTeEtWjHNeC1fa3sp3HPkmqgsSBlbXDQ2i6Dr6crsU_pUS07YbgRs0giBsLm6rkaJVZbSndnD6n5o4UkRonjPJp_SkmqHuQcmqqmpRXog6AKSHRtNFzUwVA3ILC2tv_Bf-yY3lzSYCXw9T6WQORNepYy45Ef65iW87qnhTrGpt9sdSQFMPUxY3RXFr0D2t9_RZthd3X6zVdFLeuYO3e0l_Xh4Q8WeY9r0FjtIoqr6tadpxB1yB7weQr-kVg19swMUNZqWRP2d3zM2grfAvfzNc9hNN2BQ9PD6DDycdr3ADiyRh9UcB75b4abs0JR5WKVP40hjY3a1ZyUH8-vgz9Tzj3n6HNCl5sirNKKSVruvYAJh3C66EbwuER2du0N6KXbY595cOFi4-ZMWNUFh-F_LNVZcEiIc29WsylIpDa88aEG4S_vVKOF_YpyQu5CceWdhcuxtAruUDDUwHEMob4R0HXuuGh1eiy61HBgatXQ1fXAxu4I8aK9FrszMRauArAR3nWnrs' \
 -H 'User-Agent: Mozilla/5.0 (Macintosh) mirall/2.11.0 (build 8354) (ownCloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)' \
 -H 'Accept: */*' \
 -H 'X-Request-ID: 0a65fa85-0873-4989-a0de-181b12fb5fd4' \
 -H 'Original-Request-ID: 0a65fa85-0873-4989-a0de-181b12fb5fd4' \
 -H 'Connection: Keep-Alive' --compressed \
 -H 'Accept-Language: en-DE,*' \
 -X POST 'https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?format=json' \
 -d 'path=%2FHacker-Songs%2Fcrypt-o.mp3&shareType=3&name=Context%20menu%20share%202022-08-23&expireDate=2022-08-23' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1165  100  1056  100   109   6129    632 --:--:-- --:--:-- --:--:--  7103
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 100,
      "message": "OK"
    },
    "data": {
      "id": "FOLxrMADOHhecLU",
      "share_type": 3,
      "uid_owner": "katherine",
      "displayname_owner": "Katherine Johnson",
      "additional_info_owner": "[email protected]",
      "permissions": 1,
      "stime": 1661269985,
      "parent": "",
      "expiration": "2022-08-23 00:00:00",
      "token": "EpDndOSLOKQSgdk",
      "uid_file_owner": "katherine",
      "displayname_file_owner": "Katherine Johnson",
      "additional_info_file_owner": "[email protected]",
      "state": 0,
      "path": "/Hacker-Songs/crypt-o.mp3",
      "item_type": "file",
      "mimetype": "audio/mpeg",
      "storage_id": "shared::/crypt-o.mp3",
      "storage": 0,
      "item_source": "1284d238-aa92-42ce-bdc4-0b0000009157$534bb038-6f9d-4093-946f-133be61fa4e7!077ab9f5-a3ac-400b-8d0c-b3440d9d376a",
      "file_source": "1284d238-aa92-42ce-bdc4-0b0000009157$534bb038-6f9d-4093-946f-133be61fa4e7!077ab9f5-a3ac-400b-8d0c-b3440d9d376a",
      "file_parent": "",
      "file_target": "/crypt-o.mp3",
      "share_with_user_type": 0,
      "share_with_additional_info": "",
      "mail_send": 0,
      "name": "Context menu share 2022-08-23",
      "url": "https://ocis.owncloud.com/s/EpDndOSLOKQSgdk"
    }
  }
}

This fails because of https://github.com/owncloud/ocis/issues/4446

Sharing window

CleanShot 2022-08-23 at 17 56 01

% curl \
 -H 'Ocs-APIREQUEST: true' \
 -H 'Content-Type: application/x-www-form-urlencoded' \
 -H 'Authorization: Bearer eyJhbGciOiJQUzI1NiIsImtpZCI6InByaXZhdGUta2V5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJ3ZWIiLCJleHAiOjE2NjEzNTM3MDcsImp0aSI6IjVkQ3o0QlZMVnRVVWFsWjVxMzUyUDZzcnRpYzU3alhOIiwiaWF0IjoxNjYxMjY3MzA3LCJpc3MiOiJodHRwczovL29jaXMub3duY2xvdWQuY29tIiwic3ViIjoiQnpiXzY5Q1hUam9oR1JPTkBYaVlGZ2NITmR1dlFxejA1bXJOUllXdHRzNmJWYWRVM3U1bWZscTBxLUtQbzRRVmlTakJtNHYxeUlpcnE4dWJKNlVvZGdRIiwibGcudCI6IjEiLCJzY3AiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCIsImxnLmkiOnsiZG4iOiJLYXRoZXJpbmUgSm9obnNvbiIsImlkIjoidWlkPWthdGhlcmluZSxvdT11c2VycyxvPWxpYnJlZ3JhcGgtaWRtIiwidW4iOiJrYXRoZXJpbmUifSwibGcucCI6ImlkZW50aWZpZXItbGRhcCJ9.vFX9wKgHVpsXiNgOsOeq8WFIdNw_0IXRyk7oOYk33h1KvFOl_PAwV_zZxtG24CJ6wdOCCGQDsNg5G5wRrIssZXSKLkVhKV8GSIndyhwFoRgMsJYXC5odWr2XPB8BjT7yIREol0nUb0RHNNX7qGAS53OVzouzuLcziPJp-xTeEtWjHNeC1fa3sp3HPkmqgsSBlbXDQ2i6Dr6crsU_pUS07YbgRs0giBsLm6rkaJVZbSndnD6n5o4UkRonjPJp_SkmqHuQcmqqmpRXog6AKSHRtNFzUwVA3ILC2tv_Bf-yY3lzSYCXw9T6WQORNepYy45Ef65iW87qnhTrGpt9sdSQFMPUxY3RXFr0D2t9_RZthd3X6zVdFLeuYO3e0l_Xh4Q8WeY9r0FjtIoqr6tadpxB1yB7weQr-kVg19swMUNZqWRP2d3zM2grfAvfzNc9hNN2BQ9PD6DDycdr3ADiyRh9UcB75b4abs0JR5WKVP40hjY3a1ZyUH8-vgz9Tzj3n6HNCl5sirNKKSVruvYAJh3C66EbwuER2du0N6KXbY595cOFi4-ZMWNUFh-F_LNVZcEiIc29WsylIpDa88aEG4S_vVKOF_YpyQu5CceWdhcuxtAruUDDUwHEMob4R0HXuuGh1eiy61HBgatXQ1fXAxu4I8aK9FrszMRauArAR3nWnrs' \
 -H 'User-Agent: Mozilla/5.0 (Macintosh) mirall/2.11.0 (build 8354) (ownCloud, osx-21.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)' \
 -H 'Accept: */*' \
 -H 'X-Request-ID: 5a2f7a74-921a-4f3b-a36f-5e6cf547d6cf' \
 -H 'Original-Request-ID: 5a2f7a74-921a-4f3b-a36f-5e6cf547d6cf' \
 -H 'Connection: Keep-Alive' --compressed \
 -H 'Accept-Language: en-DE,*' \
 -X POST 'https://ocis.owncloud.com/ocs/v1.php/apps/files_sharing/api/v1/shares?format=json' \
 -d 'path=%2FHacker-Songs%2Fcrypt-o.mp3&shareType=3&name=Public%20link&expireDate=2022-08-24&permissions=1' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1139  100  1038  100   101   7662    745 --:--:-- --:--:-- --:--:--  8898
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 100,
      "message": "OK"
    },
    "data": {
      "id": "xTudJmEQaSeGkjp",
      "share_type": 3,
      "uid_owner": "katherine",
      "displayname_owner": "Katherine Johnson",
      "additional_info_owner": "[email protected]",
      "permissions": 1,
      "stime": 1661270189,
      "parent": "",
      "expiration": "2022-08-24 00:00:00",
      "token": "ygXlGaekNbDTNUN",
      "uid_file_owner": "katherine",
      "displayname_file_owner": "Katherine Johnson",
      "additional_info_file_owner": "[email protected]",
      "state": 0,
      "path": "/Hacker-Songs/crypt-o.mp3",
      "item_type": "file",
      "mimetype": "audio/mpeg",
      "storage_id": "shared::/crypt-o.mp3",
      "storage": 0,
      "item_source": "1284d238-aa92-42ce-bdc4-0b0000009157$534bb038-6f9d-4093-946f-133be61fa4e7!077ab9f5-a3ac-400b-8d0c-b3440d9d376a",
      "file_source": "1284d238-aa92-42ce-bdc4-0b0000009157$534bb038-6f9d-4093-946f-133be61fa4e7!077ab9f5-a3ac-400b-8d0c-b3440d9d376a",
      "file_parent": "",
      "file_target": "/crypt-o.mp3",
      "share_with_user_type": 0,
      "share_with_additional_info": "",
      "mail_send": 0,
      "name": "Public link",
      "url": "https://ocis.owncloud.com/s/ygXlGaekNbDTNUN"
    }
  }
}

This creates a working link: CleanShot 2022-08-23 at 17 57 06

Expected behavior

API requests should be identical for both ways. Why are they different?

Steps to reproduce the issue

No response

Screenshots

No response

Logs

No response

Client version number

ownCloud 2.11.0 (build 8354) 232440 Aug 18 2022 11:37:42
Libraries Qt 5.12.11, OpenSSL 1.1.1q 5 Jul 2022
Using virtual files plugin: suffix
osx-21.6.0

Desktop environment (Linux only)

No response

Client package version and origin (Linux only)

No response

Installation path (Windows only)

No response

Server information

https://ocis.owncloud.com/

ownCloud Web UI 5.7.0-rc.9
Infinite Scale 2.0.0-beta.6 Community

Additional context

No response

michaelstingl avatar Aug 23 '22 16:08 michaelstingl

Please test with 3.0

TheOneRing avatar Sep 06 '22 10:09 TheOneRing