Tcl Library Source Code

View Ticket
Login
Ticket UUID: c247ed5db42e373470bf8a6302717e76eb3c6106
Title: LDAP protocol error
Type: Bug Version: 1.18
Submitter: pda Created on: 2017-03-21 10:22:56
Subsystem: ldap Assigned To: aku
Priority: 8 Severity: Critical
Status: Closed Last Modified: 2018-01-24 19:16:45
Resolution: Accepted Closed By: aku
    Closed on: 2018-01-24 19:16:45
Description:
Under some circumstances (large LDAP entries, e.g. with a large jpegPhoto), the LDAP module returns the following error:

Protocol error: Error reading SEQUENCE response for handle ::ldap::ldapsock15a3700

The ReceiveBytes proc seems to return 0 bytes (partial read) instead of the SEQUENCE byte. The partial read is treated as an error in MessageReceiver.
User Comments: aku added on 2018-01-24 19:16:45:

Ok. I Have not heard back from the submitters of the other tickets, for about 2.5 months. No need to hold back anymore.

This fix is now merged into both `trunk` and `tcllib-1-19-rc` (Latter is where the 1.19 release is currently getting prepared). The relevant merge commits are

  • [0826350f8d] = `trunk`
  • [2f3369f04b] = `tcllib-1-19-rc`


aku added on 2017-11-01 22:50:56:
Your fix is now applied in commit [8b8f10e2bb],
on branch [fix-ldap-partial].

It is not merged to trunk yet, as I would like to ping the reporters of the two tickets you referenced to see if their issues are solved by this too.

aku added on 2017-11-01 22:38:31:

Make refs actual links.

* [b9a39c02c7855865fb48c32d1d4dcbf8ee22750b]

* [5f4f30667b4bc066593e0aa37ddf88b62e1830b5]


pda added on 2017-03-21 12:10:23:
The attached patch may fix tickets:
b9a39c02c7855865fb48c32d1d4dcbf8ee22750b
5f4f30667b4bc066593e0aa37ddf88b62e1830b5

pda added on 2017-03-21 10:25:07:
The following patch solves the problem (I did not found the way to attach a patch in the ticket Web interface, sorry):

--- ldap.tcl.bak        2017-03-21 11:01:54.716595089 +0100
+++ ldap.tcl    2017-03-21 11:02:25.956334530 +0100
@@ -738,7 +738,10 @@
                     set conn(pdu,partial) 1
                     append conn(pdu,received) $type
                 }
-                }
+           }
+           partial {
+               return
+           }
             eof {
                 CleanupWaitingMessages $handle
                 set conn(lastError) "Server closed connection"

Attachments: