LDAP fix quota and case, fixes #20043 - #20093
Conversation
|
makes sense. please backport 👍 |
|
Working as expected - Quota is delivered and even the mass 'displayName' errors in our logfile are gone 👍 |
|
Tested and still works 👍 |
LDAP fix quota and case, fixes #20043
|
@blizzz Can you please prepare the backport? Thanks |
|
Contrary to my last comment my logs still show the displayname error: |
|
@eidota in that case it seems that the attribute was either not read or not available at all for the record. Can you give me reproduction steps? |
|
The error doesn't occur on demand, e.g. when i reload the users page. I get blocks of 66 entries of this error message about once per hour. Seems to happen when checking the ldap data in the background. Is this attribute used to fill the 'Full Name' field on the users page? Because they are shown correctly there. |
There was a problem hiding this comment.
$userRecord[$displayNameAttribute] must be [0]. Thanks to @eidota 's hint, i rechecked that part. I does not cause any trouble, because in dn2ocname this is used just for mapping a group. With that inside, i could cleanup dn2ocname() a bit… So, actually we can just leave the part displayNameAttribute part away, which will save any undefined index warning (which is probably a user record without display name).
Yes, it's the background job, calling usersInGroup() which only looks for the DN. This can also happen when viewing selecting groups on the Users page. It makes sense to read the other attributes in this case as well. There are more places in group_ldap where we are fetching users like that. But in countUsersInGroup() and inGroup() it is good keep it simple and don't read and do any more than necessary. So, Todos for me:
|
|
Please see #20124 which fixes remaining tasks |
#20093 LDAP fix quota and case #20124 remove uselessly used parameter, read all user attributes also when looking up users in groups fix update quota with known value fix attribute casing to ensure array keys work remove uselessly used parameter, read all user attributes also when looking up users in groups
This is a forward port of two issues found only when backporting #18469 to stable8.1 (#19427, #19427 (comment)). This also fixes #20043.
It needs to be backported to 8.2. Please confirm @karlitschek
Please test and review @davitol @eidota @MorrisJobke