Closed MahdiBaghbani closed 1 year ago
With changing the resourceId
to 'remoteShareId' the error goes away and we can correctly store the id of the remote share in out database.
MariaDB [efss]> select * from oc_share_external;
+----+--------------------+-----------+----------------------------------+----------+------+----------+-------+------------+----------------------------------+----------+----------+
| id | remote | remote_id | share_token | password | name | owner | user | mountpoint | mountpoint_hash | accepted | lastscan |
+----+--------------------+-----------+----------------------------------+----------+------+----------+-------+------------+----------------------------------+----------+----------+
| 1 | https://nc1.docker | 1 | O6686bx2Fg8dVDjC22A2pJEPUdxcxhLJ | | test | einstein | marie | /test | 4539330648b80f94ef3bf911f6d77ac9 | 1 | NULL |
+----+--------------------+-----------+----------------------------------+----------+------+----------+-------+------------+----------------------------------+----------+----------+
1 row in set (0.000 sec)
We have another error related to our remote shares, password
filed is problematic.
The error we get when accepting a sciencemesh share on ownCloud.
{
"reqId": "c13nTCjl8qnva6pvaLuk",
"level": 3,
"time": "2023-05-28T09:28:24+00:00",
"remoteAddr": "172.18.0.3",
"user": "marie",
"app": "PHP",
"method": "POST",
"url": "/index.php/apps/files_sharing/api/externalShares",
"message": "Undefined index: password at /var/www/html/apps/files_sharing/lib/External/Storage.php#92"
}
The error doesn't happen on Nextcloud, only on ownCloud. it is strange because both of them use the same piece of code to access the password
field.
when receiving a share from Reva we get this error:
code on the Nextcloud app: https://github.com/pondersource/nc-sciencemesh/blob/298602146718caa4c06956c4ab401cbbd2e7c277/lib/Controller/OcmController.php#L491 code on the ownCloud app: https://github.com/pondersource/nc-sciencemesh/blob/04fdbf343dbf05d591c58d86b3a98f159c9bf188/lib/Controller/RevaController.php#L957
sender side
revanc1
:Sending OCM /shares POST to https://revaoc2.docker/ocm/shares:
receiver side
revanc2
:am.do https://oc2.docker/index.php/apps/sciencemesh/~marie/api/ocm/addReceivedShare
we have 3
opaqueId
, which is unclear which one should go onremote_id
.well, we already are using owner opaqueId in owner section, so only 2 are left. https://github.com/pondersource/nc-sciencemesh/blob/298602146718caa4c06956c4ab401cbbd2e7c277/lib/Controller/OcmController.php#L495
@michielbdejong I don't see any providerId 😞
however, my guess is we should use
"remoteShareId"
as a value forremote_id"
.because it is consistent with the
id
s of share inoc_share
table on the remote side. nc1 mariadb entries as sender:oc2 mariadb entries as a receiver:
@mrvahedi68 @michielbdejong @parhamin2010 any ideas?