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

sharing with non-existing remote group or user fails silently #18

Open
michielbdejong opened this issue Jun 22, 2023 · 11 comments
Open

Comments

@michielbdejong
Copy link
Member

To einstein it looks like welcome.txt can be shared with supposed remote user or group [email protected]
I think this should produce an error 'remote user/group does not exist'

@michielbdejong
Copy link
Member Author

I'll test whether this also happens with our app not installed
And whether it also happens in OC 10.12.2

@yasharpm
Copy link
Collaborator

I think we should look at how NC handles it and do the same. As far as I remember from staring at NC code, they don't care if the group exists or even after a group is removed, the share still lives on and if the server admin adds the group again, it's like the share was always there for the members of that group that had accepted that share. I agree with this behavior as well.

@yasharpm
Copy link
Collaborator

So first step I think is to check this behavior on NC if @michielbdejong agrees.

@navid-shokri
Copy link

it seems the value of the status variable is failure instead of false

@navid-shokri
Copy link

It seems it is a bug in the Owncloud itself.
when I tried to share a file with non existing remote user there was no error on the sender side and the share is registered successfully on the sender side (but there is no share in the receiver).

@navid-shokri
Copy link

this is the full log of the process to share a file on the sender side:

sender at first step call API call:
to the https://oc2.docker/index.php/apps/federatedfilesharing/shares and receive the false result.

then it tries to call:
https://oc2.docker/ocs/v2.php/cloud/shares?format=json returns an array like this:

array (\n  'ocs' => \n  array (\n    'meta' => \n    array (\n      'status' => 'failure',\n      'statuscode' => 400,\n      'message' => 'User does not exist',\n      'totalitems' => '',\n      'itemsperpage' => '',\n    ),\n    'data' => \n    array (\n    ),\n  ),\n)

as you can in the previous code that I mentioned in my comment there is a mismatch between the actual result and the expected result in the core code.

Mon Jun 26 12:26:33.732331 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] ----------------> sendOcmRemoteShare : oc2.docker
[Mon Jun 26 12:26:34.156160 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] endpoint is : https://oc2.docker/index.php/apps/federatedfilesharing/shares
[Mon Jun 26 12:26:34.411596 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] endpoint is : https://oc2.docker/index.php/apps/federatedfilesharing/shares
[Mon Jun 26 12:26:34.589921 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] result of the sendOcmRemoteShare: false
[Mon Jun 26 12:26:34.590019 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] ----------------------------> sendPreOcmRemoteShare: oc2.docker
[Mon Jun 26 12:26:34.603173 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] endpoint is : https://oc2.docker/ocs/v2.php/cloud/shares?format=json
[Mon Jun 26 12:26:34.825654 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] endpoint is : https://oc2.docker/ocs/v2.php/cloud/shares?format=json
[Mon Jun 26 12:26:35.006921 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] result of the sending sendPreOcmRemoteShare: array (\n  'ocs' => \n  array (\n    'meta' => \n    array (\n      'status' => 'failure',\n      'statuscode' => 400,\n      'message' => 'User does not exist',\n      'totalitems' => '',\n      'itemsperpage' => '',\n    ),\n    'data' => \n    array (\n    ),\n  ),\n)
[Mon Jun 26 12:26:35.006947 2023] [php7:notice] [pid 15] [client 172.20.0.2:34516] -------> this is result: array (\n  'ocs' => \n  array (\n    'meta' => \n    array (\n      'status' => 'failure',\n      'statuscode' => 400,\n      'message' => 'User does not exist',\n      'totalitems' => '',\n      'itemsperpage' => '',\n    ),\n    'data' => \n    array (\n    ),\n  ),\n)

@navid-shokri
Copy link

navid-shokri commented Jun 26, 2023

@michielbdejong @thepeak99

is it our priority to solve the core issues?

@navid-shokri
Copy link


I created an issue on owncloud/core to address the problem.
owncloud/core#40850

@navid-shokri
Copy link

🔴
So, @thepeak99 @yasharpm @michielbdejong @soltanireza65

please apply these steps on your codespace and let me know the result.

1- ./scripts/clean.sh
2- ./scripts/init-opencloudmesh.sh
3- ./scripts/testing-opencloudmesh.sh
4- run docker exec -it oc1.docker bash
5- run apt install sudo
6- run sudo -u www-data php occ app:disable opencloudmesh
7- comment 4 beginning lines from config.php
8- apply this patch to your Ownclowd core.
9- repeat steps 4 to 8 on oc2.docker
10- now try to share a file from oc1.docker to [email protected].

@navid-shokri
Copy link

I performed the test on the pure owncloud by these steps:

1- run ./scripts/clean.sh
2- run ./scripts/testing-base-owncloud.sh

and then I shared a file from oc1.docker to [email protected] and the file was flagged as shared to [email protected] in the sender. but the receiver side was returning 'User does not exist' on the API call to this endpoint:
https://oc2.docker/ocs/v2.php/cloud/shares?format=json

@navid-shokri
Copy link

So I labeled this Issue as BLOCKED. because it seems this issue is based on the Owncloud's bug and we should prioritize it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants