Open MahdiBaghbani opened 1 year ago
Security flaw:
Marek ---share---> Mahdi ---reshare---> Milan
Marek ---unshare---> Mahdi | Mahdi cannot she the share anymore
Flaw: Milan can still see the share! Marek doesn't see any shared status on the file he just unshared.
Also: We can confirm that NC can unshare the shares to OC instances. Pondersource NC can unshare a share to Pondersource OC Marek NC can unshare a share to Pondersource OC
https://github.com/pondersource/sciencemesh-php/issues/171 result of the #255 issue.
Reshare: PSNC NC share to Ponder NC reshare to Ponder OC works PSNC NC share to Ponder NC reshare to CEZNET OC works PSNC NC share to Ponder OC reshare to CEZNET OC works
Unshare: PSNC NC unshare to Ponder NC works CEZNET can still see the file PSNC NC unshare to Ponder OC works CEZNET can still see the file PSNC NC unshare to CEZNET OC does NOT work
It is probably a config mismatch since this URL https://sciencemesh.cesnet.cz/ocs/v2.php/cloud/shares/14/unshare?format=json
is pointing to the Reva domain (/ocs/v2.php/cloud/shares/14/unshare?format=json
doesn't exist on Reva endpoint) and not the ownCloud domain thus returning 500 server error.
Regarding the unshare chain: Marek ---share DIRECTORY A---> Mahdi ---reshare---> Milan Marek ---unshare DIRECTORY A---> Mahdi ; Milan still sees the file
On my nextcloud I could not see any information about the file being shared. In the logs I had impression, that CESNET was using another token (from other files I shared to them directly). At least that is how I've interpreted the line in logs:
1.2.3.4 - dRBXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [05/Jun/2023:07:54:23 +0000] "PROPFIND /public.php/webdav/ HTTP/1.1" 401 2006 "-" "sabre-dav/4.4.0 (http://sabre.io/)"
dRBXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is the token I found in oc_share table and was associated to another share with CESNET. 1.2.3.4 was CESNET IP. When I deleted the other shares, Milan could not see Directory A.
I see at least a few potentials/bugs here:
During debug session with Marek, Milan, Giuseppe, Antoon, Thirsa, David, Mirek and David etc.
We found that we can unshare from oc to oc, oc to nc but not nc to OC:
Nextcloud log:
Reva on Nextcloud side log: