Skip to content

Conversation

ChadSikorra
Copy link
Contributor

@ChadSikorra ChadSikorra commented Jun 4, 2023

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.0 release so that the new ServerSearchResult object needs to be returned by handler implementations instead of just the entries object.

@codecov
Copy link

codecov bot commented Jun 4, 2023

Codecov Report

Merging #63 (8f7a4cb) into master (51935ed) will increase coverage by 0.96%.
The diff coverage is 98.86%.

❗ Current head 8f7a4cb differs from pull request most recent head f2081a6. Consider uploading reports for the commit f2081a6 to get more accurate results

@@             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     
Impacted Files Coverage Δ
...tocol/ServerProtocolHandler/ServerSearchResult.php 96.29% <96.29%> (ø)
...ocol/ServerProtocolHandler/ServerPagingHandler.php 92.45% <100.00%> (+1.34%) ⬆️
...ProtocolHandler/ServerPagingUnsupportedHandler.php 100.00% <100.00%> (ø)
...ocol/ServerProtocolHandler/ServerSearchHandler.php 100.00% <100.00%> (ø)
...otocol/ServerProtocolHandler/ServerSearchTrait.php 78.12% <100.00%> (+5.04%) ⬆️

... and 129 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ChadSikorra ChadSikorra force-pushed the fix-search-result-done branch 3 times, most recently from 5d48ce4 to 8f7a4cb Compare June 4, 2023 18:21
@ChadSikorra ChadSikorra force-pushed the fix-search-result-done branch from 8f7a4cb to df8dc31 Compare June 5, 2023 19:00
…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.
@ChadSikorra ChadSikorra force-pushed the fix-search-result-done branch from df8dc31 to f2081a6 Compare June 5, 2023 19:03
@ChadSikorra ChadSikorra merged commit 9baa6da into FreeDSx:master Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant