Commit 289f9a7
committed
fix(cache): DN-aware immediate-child + OU-parent reconstruction
- addOUChildren: parse DNs and compare RDN components instead of
string-matching. Fixes false-negative on immediate children whose
CN contains an escaped comma (e.g. "cn=Last\, First,ou=...").
- immediateOUFromDN: use go-ldap's DN serializer so escaped/multi-
valued RDNs round-trip correctly instead of manual concat.
- Regression test TestBuildGraph_OUFocus_EscapedCommaChild pins the
escaped-comma case. Mutation-tested: temporarily reverting the
DN-parsing check makes the test fail as expected.
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>1 parent 749dea1 commit 289f9a7
2 files changed
Lines changed: 71 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 389 | + | |
| 390 | + | |
409 | 391 | | |
410 | 392 | | |
411 | | - | |
| 393 | + | |
412 | 394 | | |
413 | 395 | | |
414 | 396 | | |
| |||
467 | 449 | | |
468 | 450 | | |
469 | 451 | | |
470 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
471 | 456 | | |
472 | | - | |
473 | | - | |
474 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
475 | 461 | | |
476 | 462 | | |
477 | | - | |
478 | | - | |
479 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
480 | 475 | | |
481 | 476 | | |
482 | 477 | | |
| |||
489 | 484 | | |
490 | 485 | | |
491 | 486 | | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
| 487 | + | |
498 | 488 | | |
499 | 489 | | |
500 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
356 | 403 | | |
357 | 404 | | |
358 | 405 | | |
| |||
0 commit comments