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

Invalid parameter for link responds with HTTP 200 status code, but link creation fails #4446

Closed
michaelstingl opened this issue Aug 23, 2022 · 2 comments
Assignees
Labels

Comments

@michaelstingl
Copy link
Contributor

michaelstingl commented Aug 23, 2022

Describe the bug

Desktop sync client 2.11 (doesn't know about Spaces, TUS and new unified links yet) creates link from context menu (Create and copy public link to clipboard action), but because of #4445 , the expireDate is set to today. (expireDate=2022-08-23)

Backend responds with successful link creation response, but when accessing the link, an error is shown. (#4380 and #4442)

Steps to reproduce

% curl \
 -H 'Authorization: Bearer eyJhbGciOiJQUzI1NiIsImtpZCI6InByaXZhdGUta2V5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJ3ZWIiLCJleHAiOjE2NjEzNTM3MDcsImp0aSI6IjVkQ3o0QlZMVnRVVWFsWjVxMzUyUDZzcnRpYzU3alhOIiwiaWF0IjoxNjYxMjY3MzA3LCJpc3MiOiJodHRwczovL29jaXMub3duY2xvdWQuY29tIiwic3ViIjoiQnpiXzY5Q1hUam9oR1JPTkBYaVlGZ2NITmR1dlFxejA1bXJOUllXdHRzNmJWYWRVM3U1bWZscTBxLUtQbzRRVmlTakJtNHYxeUlpcnE4dWJKNlVvZGdRIiwibGcudCI6IjEiLCJzY3AiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCIsImxnLmkiOnsiZG4iOiJLYXRoZXJpbmUgSm9obnNvbiIsImlkIjoidWlkPWthdGhlcmluZSxvdT11c2VycyxvPWxpYnJlZ3JhcGgtaWRtIiwidW4iOiJrYXRoZXJpbmUifSwibGcucCI6ImlkZW50aWZpZXItbGRhcCJ9.vFX9wKgHVpsXiNgOsOeq8WFIdNw_0IXRyk7oOYk33h1KvFOl_PAwV_zZxtG24CJ6wdOCCGQDsNg5G5wRrIssZXSKLkVhKV8GSIndyhwFoRgMsJYXC5odWr2XPB8BjT7yIREol0nUb0RHNNX7qGAS53OVzouzuLcziPJp-xTeEtWjHNeC1fa3sp3HPkmqgsSBlbXDQ2i6Dr6crsU_pUS07YbgRs0giBsLm6rkaJVZbSndnD6n5o4UkRonjPJp_SkmqHuQcmqqmpRXog6AKSHRtNFzUwVA3ILC2tv_Bf-yY3lzSYCXw9T6WQORNepYy45Ef65iW87qnhTrGpt9sdSQFMPUxY3RXFr0D2t9_RZthd3X6zVdFLeuYO3e0l_Xh4Q8WeY9r0FjtIoqr6tadpxB1yB7weQr-kVg19swMUNZqWRP2d3zM2grfAvfzNc9hNN2BQ9PD6DDycdr3ADiyRh9UcB75b4abs0JR5WKVP40hjY3a1ZyUH8-vgz9Tzj3n6HNCl5sirNKKSVruvYAJh3C66EbwuER2du0N6KXbY595cOFi4-ZMWNUFh-F_LNVZcEiIc29WsylIpDa88aEG4S_vVKOF_YpyQu5CceWdhcuxtAruUDDUwHEMob4R0HXuuGh1eiy61HBgatXQ1fXAxu4I8aK9FrszMRauArAR3nWnrs' \
 -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   3435    354 --:--:-- --:--:-- --:--:--  3896
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 100,
      "message": "OK"
    },
    "data": {
      "id": "ZBWcfCouHOrMekx",
      "share_type": 3,
      "uid_owner": "katherine",
      "displayname_owner": "Katherine Johnson",
      "additional_info_owner": "[email protected]",
      "permissions": 1,
      "stime": 1661268467,
      "parent": "",
      "expiration": "2022-08-23 00:00:00",
      "token": "bGkttHKDIOQvccg",
      "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/bGkttHKDIOQvccg"
    }
  }
}

Setup

https://ocis.owncloud.com/

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

@dragotin FYI

@butonic
Copy link
Member

butonic commented Sep 30, 2022

ah, it uses today as in 00:00 today, which already passed

@butonic
Copy link
Member

butonic commented Nov 8, 2022

closing as cs3org/reva#3298 is in ocis master / the ga release build

@butonic butonic closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants