-
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
Do not allow various special usernames (UIDs) #37268
Conversation
Comments please from anybody. Are there others that should be added to the list? |
good improvement. |
Codecov Report
@@ Coverage Diff @@
## master #37268 +/- ##
=========================================
Coverage 64.55% 64.55%
- Complexity 19207 19208 +1
=========================================
Files 1267 1267
Lines 75065 75068 +3
Branches 1331 1331
=========================================
+ Hits 48458 48461 +3
Misses 26215 26215
Partials 392 392
Continue to review full report at Codecov.
|
Hey, how about updater-data I think it's a directory created by the updater. |
9d13823
to
acfb1e4
Compare
Anyone know about this? I didn't find the string mentioned in the core repo. Can anyone think of other special strings that should be prohibited? |
It's related to this doc
I don't know why I found updater-data in my case on some ownClouds, but updater_backup seems official, I guess. |
@VicDeo might know about the updater |
Is it worthy to provide some kind of "UserUidValidator" to be injected there, instead of using a fixed list of names? We could use a chain of implementations, such as a hardcoded list or a list configurable via config.php file. This could be more flexible in case we miss a name, or if the admin wants to forbid a particular name for whatever reason. |
@jvillafanez Yes, please go in that direction. |
@jvillafanez please take over this PR. (Or make a new one) |
Updater is located in a separate repo and the path to it's data is |
8806420
to
1bb31a3
Compare
6a687ef
to
3213f55
Compare
@micbar (and anyone who wants to say anything), I think we need to decide what happen to the accounts that have been created before making the uid invalid.
For now, the code doesn't really do anything to that account, but the user won't be able to login ( The current code won't sync accounts (looking particularly at LDAP, but applicable to any backend) with potentially dangerous uids. |
718824b
to
1bb31a3
Compare
Reverted the changes to the original ones due to overengineering |
1bb31a3
to
3f24a12
Compare
3f24a12
to
4aa37a8
Compare
@micbar @DeepDiver1975 @PVince81 @jvillafanez @VicDeo or anyone. Please review and advise if this is OK as-is or if there is more to do or another approach needed. |
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.
In general I'm fine with this approach.
As for me, making $invalidUids
a protected class member is preferable.
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.
assuming we aren't missing any name
Description
If UIDs are created with these "special" values then "bad things happen" because there are folders in the
data
directory, or end-points that become ambiguous or...Prevent them from being created as local users.
(will also need some action for user_ldap to sort out what to do if a UID like this exists in LDAP)
Related Issue
#30438 and #32547 and #37267
How Has This Been Tested?
CI and manually try to create these users in the webUI
Types of changes
Checklist: