Skip to content

getRootFolder should not setup the FS for any user - #22493

Merged
DeepDiver1975 merged 2 commits into
masterfrom
issue_22467
Feb 18, 2016
Merged

DeepDiver1975 merged 2 commits into
masterfrom
issue_22467

Conversation

@rullzer

@rullzer rullzer commented Feb 18, 2016

Copy link
Copy Markdown
Contributor

Fixes #22467

This can go wrong when an app (take the ldap app) DIs something that
needs the rootFolder. This break if we use cookie auth since then we
know the user at that point and thus try to setup the fs for that user.

However if there are then incomming shares from an ldap user they will
fails since the user manager can't find them yet.

Now getRootFolder does not setup the fs for any user.

@icewind1991 I plese have a look at this.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@icewind1991

Copy link
Copy Markdown
Contributor

I think this should be fine 👍

Fixes #22467

This can go wrong when an app (take the ldap app) DIs something that
needs the rootFolder. This break if we use cookie auth since then we
know the user at that point and thus try to setup the fs for that user.

However if there are then incomming shares from an ldap user they will
fails since the user manager can't find them yet.

Now getRootFolder does not setup the fs for any user.
@rullzer

rullzer commented Feb 18, 2016

Copy link
Copy Markdown
Contributor Author

Please review: @PVince81 @nickvergessen @DeepDiver1975

Comment thread lib/private/files/node/root.php Outdated
* @param \OC\Files\Mount\Manager $manager
* @param \OC\Files\View $view
* @param \OC\User\User $user
* @param \OC\User\User | null $user

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm ok.. fixed.

@PVince81

Copy link
Copy Markdown
Contributor

Tested, works 👍

@PVince81

Copy link
Copy Markdown
Contributor

Note: this assumes that API consumers are using getUserFolder instead of getRootFolder, because from getRootFolder they would not be able to reach the user's homes.

@PVince81

Copy link
Copy Markdown
Contributor

@rullzer

rullzer commented Feb 18, 2016

Copy link
Copy Markdown
Contributor Author

Potentially dangerous, see https://github.com/owncloud/core/pull/22410/files#r53318501

I don't think it is. If you want to access a user folder you should init the mount points.. This logic does not change that.

But indeed @icewind1991 please double check.

@icewind1991

Copy link
Copy Markdown
Contributor

#22410 manually sets up the fs so it's unaffected

@PVince81

Copy link
Copy Markdown
Contributor

Right, makes sense. Thanks

DeepDiver1975 added a commit that referenced this pull request Feb 18, 2016
getRootFolder should not setup the FS for any user
@DeepDiver1975
DeepDiver1975 merged commit 48f6ae0 into master Feb 18, 2016
@DeepDiver1975
DeepDiver1975 deleted the issue_22467 branch February 18, 2016 15:46
@lock

lock Bot commented Aug 7, 2019

Copy link
Copy Markdown

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.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Share file from ext storage from LDAP user to regular user, doesn't appear

5 participants