forked from go-ldap/ldap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix control packets being encoded when none exist on bind
During the code reshuffle in go-ldap#126 at bind time a call to encodeControls was added. Unfortunately, the safety check around calling it when there are no controls to encode were omitted from this call (unlike in del.go and search.go). As a result the packet was always getting control characters added even if there were none to encode. I also modified the checks in del.go and search.go to be a little safer; rather than check for a nil slice, it also will do the right thing when the slice is not nil but there are no entries.
- Loading branch information
Showing
3 changed files
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters