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

Shares don't have a full file path anymore #2462

Closed
kulmann opened this issue Sep 1, 2021 · 8 comments
Closed

Shares don't have a full file path anymore #2462

kulmann opened this issue Sep 1, 2021 · 8 comments
Assignees
Labels
Category:Defect Existing functionality is not working as expected OCIS-Fastlane Planned outside of the sprint Priority:p2-high Escalation, on top of current planning, release blocker Status:Needs-Review Needs review from a maintainer Type:Bug

Comments

@kulmann
Copy link
Member

kulmann commented Sep 1, 2021

Describe the bug

Shares listed in Shared via links or Shared with others don't have a full file path anymore.

Steps to reproduce

Steps to reproduce the behavior:

  1. upload lorem.txt into home
  2. navigate into test-folder
  3. upload lorem.txt test-folder
  4. share both lorem.txt files via quick action for public links
  5. go to shared via links page

Expected behavior

The two shares are two unique entries in the shares list

Actual behavior

The two shares get grouped into one entry in the shares list

Setup

oCIS current master @ 7b1a7b2

Bug analysis

  1. curl 'https://host.docker.internal:9200/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&reshares=true&include_tags=false&format=json'
  2. inspect response
  3. see that the path and file_target are identical for both shares.
  4. storage_id is different for both shares

I'd expect the path to reflect the parent folders, since this is not shared with me but shared with others. If this is intentionally breaking/changed, we need to do some changes in the web ui. Please tell me how to proceed. :-)

@kulmann kulmann changed the title Shares don Shares don't have a full file path anymore Sep 1, 2021
@kulmann
Copy link
Member Author

kulmann commented Sep 1, 2021

cs3org/reva#1739 might be related, but from a first glimpse at the code it won't fix the issue.

@phil-davis
Copy link
Contributor

Is this a related issue: #2133 ?

@kulmann
Copy link
Member Author

kulmann commented Sep 2, 2021

Is this a related issue: #2133 ?

yes, looks like it's related

@dragotin dragotin added the Priority:p2-high Escalation, on top of current planning, release blocker label Oct 28, 2021
@dschmidt
Copy link
Member

I just stumbled over this as well. I would like to add that not only the path information is missing, but also the escaping/encoding changed:

http: //host.docker.internal:8080/ocs/v2.php/apps/files_sharing//api/v1/shares?format=json&share_types=3&include_tags=false&format=json

                "path": "\/Photos\/Portugal.jpg",

https: //host.docker.internal:9200/ocs/v2.php/apps/files_sharing//api/v1/shares?format=json&share_types=3&include_tags=false&format=json

                "path": "/Portugal.jpg",

Notice the backslashes.

Is there any news on this issue?

@micbar
Copy link
Contributor

micbar commented Feb 22, 2022

@dschmidt @butonic See cs3org/reva#2580 as an approach.

I have some questions to the grouping of shares in oc web.

Is grouping generally desired? (see screenshot below)

It seems to use file_target for grouping outgoing shares which seems wrong.
I would suggest using the fileID for grouping shares together.

Screenshot (wrong attribute but display makes sense)

1645561185096

Response (wrong backend behavior)

{
    "ocs": {
        "meta": {
            "status": "ok",
            "statuscode": 100,
            "message": "OK"
        },
        "data": [
            {
                "id": "NsluGoraTkVJksl",
                "share_type": 3,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645544142,
                "parent": "",
                "expiration": "",
                "token": "IAZWlHamyjDeMWu",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!b19ea6fc-21a8-4a3a-9346-cc226adf15c7",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!b19ea6fc-21a8-4a3a-9346-cc226adf15c7",
                "file_parent": "",
                "file_target": "/DSC04184.JPG",
                "share_with_additional_info": "",
                "mail_send": 0,
                "name": "Quick-Action-Link",
                "url": "https://localhost:9200/#/s/IAZWlHamyjDeMWu"
            },
            {
                "id": "uYhDZllDCbtwCKD",
                "share_type": 3,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645544137,
                "parent": "",
                "expiration": "",
                "token": "wqeIEYqVnEueUSy",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_parent": "",
                "file_target": "/DSC04184.JPG",
                "share_with_additional_info": "",
                "mail_send": 0,
                "name": "Quick-Action-Link",
                "url": "https://localhost:9200/#/s/wqeIEYqVnEueUSy"
            },
            {
                "id": "e628709b-b913-4914-bc89-1cea060cad86",
                "share_type": 0,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645545111,
                "parent": "",
                "expiration": "",
                "token": "",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/Shares/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_parent": "",
                "file_target": "/Shares/DSC04184.JPG",
                "share_with": "einstein",
                "share_with_displayname": "Albert Einstein",
                "share_with_additional_info": "[email protected]",
                "mail_send": 0,
                "name": ""
            },
            {
                "id": "8be33b64-ee8a-4b0f-9180-099d7acc6b22",
                "share_type": 0,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645546038,
                "parent": "",
                "expiration": "",
                "token": "",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week",
                "item_type": "folder",
                "mimetype": "httpd/unix-directory",
                "storage_id": "shared::/Shares/ocis-hack-week",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!14a87e54-22ee-4316-a29a-5e9e3fb5bc7f",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!14a87e54-22ee-4316-a29a-5e9e3fb5bc7f",
                "file_parent": "",
                "file_target": "/Shares/ocis-hack-week",
                "share_with": "einstein",
                "share_with_displayname": "Albert Einstein",
                "share_with_additional_info": "[email protected]",
                "mail_send": 0,
                "name": ""
            }
        ]
    }
}

It seems to use "file_target": "/Shares/DSC04184.JPG", as grouping attribute. The value makes no sense on the public link share. My pull request changes that.

Response (Right backend behavior)

{
    "ocs": {
        "meta": {
            "status": "ok",
            "statuscode": 100,
            "message": "OK"
        },
        "data": [
            {
                "id": "NsluGoraTkVJksl",
                "share_type": 3,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645544142,
                "parent": "",
                "expiration": "",
                "token": "IAZWlHamyjDeMWu",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!b19ea6fc-21a8-4a3a-9346-cc226adf15c7",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!b19ea6fc-21a8-4a3a-9346-cc226adf15c7",
                "file_parent": "",
                "file_target": "/DSC04184.JPG",
                "share_with_additional_info": "",
                "mail_send": 0,
                "name": "Quick-Action-Link",
                "url": "https://localhost:9200/#/s/IAZWlHamyjDeMWu"
            },
            {
                "id": "uYhDZllDCbtwCKD",
                "share_type": 3,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645544137,
                "parent": "",
                "expiration": "",
                "token": "wqeIEYqVnEueUSy",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_parent": "",
                "file_target": "/DSC04184.JPG",
                "share_with_additional_info": "",
                "mail_send": 0,
                "name": "Quick-Action-Link",
                "url": "https://localhost:9200/#/s/wqeIEYqVnEueUSy"
            },
            {
                "id": "e628709b-b913-4914-bc89-1cea060cad86",
                "share_type": 0,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645545111,
                "parent": "",
                "expiration": "",
                "token": "",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/Shares/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_parent": "",
                "file_target": "/Shares/DSC04184.JPG",
                "share_with": "einstein",
                "share_with_displayname": "Albert Einstein",
                "share_with_additional_info": "[email protected]",
                "mail_send": 0,
                "name": ""
            },
            {
                "id": "8be33b64-ee8a-4b0f-9180-099d7acc6b22",
                "share_type": 0,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645546038,
                "parent": "",
                "expiration": "",
                "token": "",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week",
                "item_type": "folder",
                "mimetype": "httpd/unix-directory",
                "storage_id": "shared::/Shares/ocis-hack-week",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!14a87e54-22ee-4316-a29a-5e9e3fb5bc7f",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!14a87e54-22ee-4316-a29a-5e9e3fb5bc7f",
                "file_parent": "",
                "file_target": "/Shares/ocis-hack-week",
                "share_with": "einstein",
                "share_with_displayname": "Albert Einstein",
                "share_with_additional_info": "[email protected]",
                "mail_send": 0,
                "name": ""
            }
        ]
    }
}

Bottom line is, it should use "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",. as a grouping attribute.

FYI @dschmidt @butonic @kulmann @phil-davis

@micbar micbar added Status:Needs-Review Needs review from a maintainer Category:Defect Existing functionality is not working as expected OCIS-Fastlane Planned outside of the sprint labels Feb 22, 2022
@micbar micbar self-assigned this Feb 22, 2022
@phil-davis
Copy link
Contributor

The failing acceptance test is now passing after the latest reva code was pulled in with PR #3231

@saw-jan
Copy link
Member

saw-jan commented Feb 25, 2022

web test also passed while bumping to latest oCIS https://drone.owncloud.com/owncloud/web/23041/67/15

@dschmidt
Copy link
Member

dschmidt commented Mar 3, 2022

Fixed in master (via cs3org/reva#2580) 😍

I'll create a new ticket for the grouping issue in oC Web...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Defect Existing functionality is not working as expected OCIS-Fastlane Planned outside of the sprint Priority:p2-high Escalation, on top of current planning, release blocker Status:Needs-Review Needs review from a maintainer Type:Bug
Projects
None yet
Development

No branches or pull requests

6 participants