Uh oh!
There was an error while loading. Please reload this page.
fix: remove caching in fetchListOfGroups - #47513
Conversation
b911880 to
a81b6beComparecome-nc
commented
Sep 13, 2024
Is that fixing the same issue as #45364? |
Looks related. server/apps/user_ldap/lib/Access.php Lines 949 to 966 in dde0b48 Our working theory was that the above block maps LDAP groups that do not match the group filter. That can happen with nested groups, where we cannot use the group filter for the query right away. I think it should work to combine this pr with #45364: Keep the caching logic, but turn auto-mapping off. If @blizzz and you think we should keep it, then let's do it. But please keep in mind that the amount of caching logic makes the code really difficult to understand and debug, and therefore removing the cache block improves the maintainability a bit. |
come-nc
commented
Sep 17, 2024
Quite frankly I think we can remove this logic it looks like it tries to be too smart. |
afe91fb to
a50ce1aComparekesselb
commented
Sep 23, 2024
I tried gathering you some reliable data, but's the caching layers, having the mapping in the db already yes/no, .... makes it horrible to get reproducible results. Login with LDAP user: Calls RCeguhBIPMUV5367Y3EP (master) Calls aZrSU6ja9xgU3k85USB2 (this branch) |
jgrocha
commented
Oct 9, 2024
I may be missing something, but I did not solve the issue on my side with this fix. I've commented out the code on my side, but the problem persists. I'm still getting those emails "An administrator removed you from group ..." How should I test this? Should I clear something from the BD? Reconfigure LDAP? |
come-nc
commented
Oct 14, 2024
You should double-check your LDAP configuration in Nextcloud for group-member association. |
jgrocha
commented
Oct 14, 2024
Upgrading to the recent 29.0.8 version fixed the problem. This same code is still there (the code commented out in this PR on |
jgrocha
commented
Oct 22, 2024
Upgrading to 30.0.1 restores this issue! A lot of new email messages with An administrator removed you from group xxxx |
joshtrichards
commented
Nov 7, 2024
Issue #29832 may or may not also contain some related reports this covers. |
come-nc
left a comment
There was a problem hiding this comment.
I merged the other PR, but I still think we should merge this one.
The only possible performance impact is for new groups in the LDAP, which is a rare situation.
It avoids potential complicated bugs and ease debugging such issues in the future.
a50ce1a to
24d118fComparecome-nc
commented
Jan 28, 2025
CI failing on |
When using nested groups without a memberof overlay, then fetchListOfGroups is called from getGroupsByMember without applying the group filter. In some setups, the "unfiltered" result is then written back to the group mapping table. That might cause random "An administrator removed you from group" activities. I was unable to replicate it locally, but we got the feedback that the random activities stopped with the patch applied. Ref: #42195 Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
24d118f to
485f3f4Comparecome-nc
commented
Feb 27, 2025
This was because the test changes configuration and does not wait for group mapping to sync, so it was relying on the automapping that this PR is removing. |
come-nc
commented
Feb 27, 2025
/backport to stable31 |
come-nc
commented
Feb 27, 2025
/backport to stable30 |
come-nc
commented
Feb 27, 2025
/backport to stable29 |
brianjmurrell
commented
Feb 27, 2025
I applied this patch to my local NC 30 instance but my Activity log is still showing a battling removal and addition of groups: |
Summary
When using nested groups without a memberof overlay, then fetchListOfGroups is called from getGroupsByMember without applying the group filter.
In some setups, the "unfiltered" result is then written back to the group mapping table. That might cause random "An administrator removed you from group" activities.
I was unable to replicate it locally, but we got the feedback that the random activities stopped with the patch applied.
Ref: #42195
TODO
Checklist