[LdapServer] Fix the SearchResultDone result code if an operation exception occurs.#63
Merged
ChadSikorra merged 1 commit intoFreeDSx:masterfrom Jun 5, 2023
Conversation
56cd9c6 to
618fa46
Compare
Codecov Report
@@ Coverage Diff @@
## master #63 +/- ##
============================================
+ Coverage 85.10% 86.07% +0.96%
+ Complexity 3660 1844 -1816
============================================
Files 256 129 -127
Lines 9472 4739 -4733
============================================
- Hits 8061 4079 -3982
+ Misses 1411 660 -751
... and 129 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
5d48ce4 to
8f7a4cb
Compare
8f7a4cb to
df8dc31
Compare
…wn, return the result code as part of the SearchResultDone message. This is how LDAP clients would expect it and how the RFC specifies that it would be done. Currently, the operation exception comes as an unexpected message after the SearchResultDone which would be considered an unsolicited message from a clients perspective and would cause an immediate disconnected from the server.
df8dc31 to
f2081a6
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resolves the issues brought up in this PR / bug report: #58
The issue is that we are sending the OperationException result code, during server search handler implementations, as an out of order message after the SearchResultDone is already sent. This corrects the logic so that the result code and any diagnostic message is now sent properly in the SearchResultDone message.
I will likely change the interface for handler implementations as part of the
1.0.0release so that the newServerSearchResultobject needs to be returned by handler implementations instead of just the entries object.