-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Prevent creating users with existing files #18130
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
Prevent creating users with existing files #18130
Conversation
rullzer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
|
tests do boom |
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
7f919be to
6004f62
Compare
|
I fixed our "unit" tests.... arg |
|
This change prevented us from a migration of files: We have provided only the files from an old Nextcloud instance into the data directory of a new one. With Nextcloud 17 this scenario was fine. The user could log in and see his files. Now they get an error 403 without any further info. I couldn't even find something about that in the log file.
|
|
The link was missing, it is #16196 |
|
Thank you for your quick reply @nickvergessen! Actually my on only problem is about line 642: This was only |
|
Well before it was hardcoded to what we know. But if an app creates something in root, it could still be overwritten by creating a user. I don't know how you create your users, but what you can do is:
|
|
Yes, that's possible. But we've got about 700 Users. And they are provided by an external auth module (user_cas), so Nextcloud isn't aware of them before they log in the first time. Maybe it would have been good to clean the data dir by moving the user accounts into a separate sub folder named
Has this really been an issue to someone? Are apps even encouraged to write into this folder? |
Well it's a security thread so we fix it.
Not encouraged, but we also don't prevent it We will not revert this, in case you accept this security risk you can change your code. But don't come back here when your nextcloud got hacked because of it 😉 |
Signed-off-by: Joas Schilling [email protected]