Commit 7d64bd4
committed
fix(cache): exclude AD computer accounts from FindUsers
simple-ldap-go's FindUsers uses
(|(objectClass=user)(objectClass=inetOrgPerson)(objectClass=person))
— and in Active Directory computer accounts inherit objectClass=user,
so they leak into the users cache. The /users page (and BuildGraph,
BuildListGraph, anything else built on FindUsers) showed machine
accounts alongside real users.
Filter at the cache layer: any DN also present in the Computers cache
is dropped from the user iteration. Single O(1) lookup per user via
the existing dnIndex.
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>1 parent 23a2611 commit 7d64bd4
1 file changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
319 | 325 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
325 | 330 | | |
326 | | - | |
| 331 | + | |
| 332 | + | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
| |||
0 commit comments