-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Check proper case for user UID #9633
Conversation
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Nope! This is not the way to go. A lot of things will do 💥. (like people that use case insentivie login from the desktop or android client). The loginname is case insensitive on our database backend. |
I never knew! :o Well, I don't see any other proper way to do it. Adding a check on every userExists function in the provisioning api seems like a terrible way to implement such verification. :/ |
Well then the provisioningAPI will just return non sensible data if you don't case the userid correctly. Better than the alternative now ;) |
@rullzer our current backend return the uid we request, so there is no way to check if |
Codecov Report
@@ Coverage Diff @@
## master #9633 +/- ##
===========================================
+ Coverage 51.7% 51.7% +<.01%
- Complexity 25706 25707 +1
===========================================
Files 1635 1635
Lines 95957 95960 +3
Branches 1384 1384
===========================================
+ Hits 49611 49613 +2
- Misses 46346 46347 +1
|
@skjnldsv k let me think if there is a solutoion. But this is not it ;) |
loadUser is called from |
@blizzz mmmm that might be true... lets see. |
Ok we should do some extensive testing here to make sure it keeps working. |
Well, we already know that with this patch, we can create 'test0' and Test0' users. Maybe keep the non sensitive case check on the userExists check? |
one valid case that @rullzer described: the local backend uses it when creating users, it would still need to make sure that the user id is not taken. what createuser does not do however: asking the User Managers userExists to check against other user backends. Suggestion: we could phase out userExists, point towards getUser('uid') as a test for existence, and introduce a isUserIDReserved or something like that for user backends to see whether they can give away that one. |
@rullzer @nickvergessen Mind to review? |
Most likely nothing for 14 -> moving to 15. |
I guess we need to move this to 16 😢 |
I'm guessing we can close @MorrisJobke |
Fix #9532
Testing:
$.get('/ocs/v2.php/cloud/users/admin')
200$.get('/ocs/v2.php/cloud/users/Admin')
404