Uh oh!
There was an error while loading. Please reload this page.
Check proper case for user UID - #9633
Conversation
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
rullzer
commented
May 28, 2018
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. |
skjnldsv
commented
May 28, 2018
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. :/ |
rullzer
commented
May 28, 2018
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
|
rullzer
commented
May 28, 2018
@skjnldsv k let me think if there is a solutoion. But this is not it ;) |
blizzz
commented
May 28, 2018
loadUser is called from |
rullzer
commented
May 28, 2018
@blizzz mmmm that might be true... lets see. |
rullzer
commented
May 28, 2018
Ok we should do some extensive testing here to make sure it keeps working. |
skjnldsv
commented
May 28, 2018
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? |
blizzz
commented
May 28, 2018
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. |
skjnldsv
commented
Jun 7, 2018
MorrisJobke
commented
Jul 11, 2018
@rullzer@nickvergessen Mind to review? |
MorrisJobke
commented
Jul 25, 2018
Most likely nothing for 14 -> moving to 15. |
MorrisJobke
commented
Nov 7, 2018
I guess we need to move this to 16 😢 |
skjnldsv
commented
Nov 7, 2018
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