-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Indirect share of s2s share isn't possible #13695
Comments
Sure that this isn't #13490? |
I just reproduced with
as head (current master) on both instance. (pulled 5 minutes ago) |
As I wrote: It works if I share the accepted share directly, but not if I put the share into a folder and then share that parent folder ;) |
Hey, it's late – don't blame me ;-) |
this should be easy to debug in order to find the cause - let's analyze this and see how this can be fixed an decide afterwards if this is 8.0 or 8.1 |
@schiesbn can you have a look ? |
There is code in lib/private/share/share.php which check exactly this and refuses to create such shares. That's why we have such a descriptive error message for it. But I'm not sure why we prevent such shares... @PVince81 do you have a idea? I remember we discussed all this various cases from mount points in mount points and reshares a lot. At the moment I don't see why it is blocked, but I'm quite sure we had good reasons back than so I don't want to remove this check to fast. |
Btw. that's not s2s related, same should happen if you put a local share in the folder. |
@schiesbn But why is it working when I share the share itself directly?!? It should work in both ways or in none of these. |
btw @MorrisJobke with your 4th step (moving the accepted share into a folder) I get: |
I don't remember exactly which exact case. I think it was mostly cases where the permissions would become ambiguous, for example moving a folder you received from someone into your own outgoing share folder. That might qualify as a reshare though... |
@PVince81 I moved the received folder into an unshared folder and then tried to share. Let me test that again. |
Still an issue with up to date master on both servers. Now with screen recording (left is server1 and right is server2) Log from server1:
log from server2:
Screen recording: https://cloud.morrisjobke.de/public.php?service=files&t=0b8db8c9fd8cb88fdd2db4824b869638 |
@MorrisJobke That's because if this check: https://github.com/owncloud/core/blob/master/lib/private/share/share.php#L572 If you remove it it should work... But at the moment I don't feel to comfortable to remove it. It might be OK in your case but I'm quite sure we had a good reason to add this check. |
So this is partly the intended behaviour. Removing the 8.0 milestone This is also related to #13776 |
@schiesbn I guess the problem is that a sharing loop can be created. Simplest loop: User1: folder1 share public Have fun FileScanner |
@nickvergessen Yes. That is actually a big problem and nothing we can solve for 8.0 I think. I hope this gets better once all this sharing stuff is simplified (#9058) This will reduce the complexity of such constructs a lot. |
@MorrisJobke does this still happen on master / 8.1 ? |
Yes. Still happens. With both being master. |
@michaelstingl Noticed this too. What is the solution for this? Can we deny the reshare if the folder contains a share that has no reshare permission? BTW: If you share the folder before moving the share into it, it works. After the folder is shared you can move the received share in it and voila ... it works. We definetely need to work on the permissions. Because this allows a reshare ;) |
Guys is this a blue ticket or is this simply a feature request? |
Or is this a bug? |
I rated it as bug, because I felt like it should work. Then I talked to @schiesbn and he said, that it is working as intended and the other behavior (move a share into an existing share) is the bug (and not the feature). I guess we need to have a look at this together with all the share work that is done nowadays. cc @rullzer |
I don't get from this discussion what the actual behaviour we want is? Shares within shares are a complex thing and I think we deny them for good reasons. Let me explain:
Now obviously this should fail since we don't allow increasing permissions. But we can't check all the files/folders in 'bar' since that would kill all performance. Now consider the other way around. If we would allow the share, userC would see 'bar' appear. But for some reason they do not have write access to 'foo'. And this becomes even more of a mess since we want to move to a flat sharing model. So that the effective reshare of 'foo' would show up as a regular share at UserA. Long story short. Shares within shares is a complex beast. And I think the 'real world' use cases are rather limited. |
@bboule To answer your question - this is rather a feature request. |
This is not really security relevant - rather privacy stuff. |
I would like @schiesbn 's input on this. :) The thought here:
Then we also need to think carefully about all of the migration for this...so that we don't get orphans or other issues. Yeah! |
@MorrisJobke What is the status here? |
I don't think this has changed much, but maybe the flattened share data has brought some benefits - cc @rullzer ? |
@MorrisJobke I stand by my comment in #13695 (comment) This is by design and complicates stuff significantly. |
@DeepDiver1975 @dragotin Could you have another look? What can we do here? |
@michaelstingl which would be the expected behavior you think we should work towards ? So far the current behavior is by design. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Share a file by the invite based (mjob@server2) s2s share on server1login as mjob at server2 and accept the shareExpected behaviour
I got a link
Actual behaviour
Error message
Sharing "FOLDERNAME" failed, because it contains files shared with you!
Comments
cc @schiesbn @PVince81
The text was updated successfully, but these errors were encountered: