Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ControlServerSideSortingResult handling for OpenLDAP #546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EgorKo25
Copy link

Description

This pull request fixes an issue in the ControlServerSideSortingResult function where an empty pkt.Children caused an error in OpenLDAP. According to OpenLDAP behavior, the presence of Children is not always required, so returning an empty ControlServerSideSortingResult instead of an error ensures better compatibility.

Changes

  1. Replaced struct instantiation with new(...) for consistency.
  2. Modified NewControlServerSideSortingResult to return an empty ControlServerSideSortingResult instead of an error when pkt.Children is missing.
  3. Added an inline comment explaining the fix.

Testing

  1. Manually tested with OpenLDAP to confirm that it no longer fails on missing Children.
  2. Existing tests pass successfully.

Additional Notes

  1. This fix improves OpenLDAP compatibility without affecting other LDAP implementations.
  2. No breaking changes introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant