Tcl Library Source Code

Check-in [2f3369f04b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Tkt [c247ed5db4] ldap/ldap <B,D>. Merge of fix for protocol error, into release prep.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | tcllib-1-19-rc
Files: files | file ages | folders
SHA3-256: 2f3369f04be1209eb064cbc594e8eea970badb59eeae313c8b5f983f96e3219b
User & Date: aku 2018-01-24 19:12:56.392
Original Comment: Tkt <c247ed5db4> ldap/ldap <B,D>. Merge of fix for protocol error, into release prep.
References
2018-01-24
19:16 Closed ticket [c247ed5db4]: LDAP protocol error plus 6 other changes artifact: 974728a28b user: aku
Context
2018-01-24
19:44
Tkt [e2cc72f496] inifile/ini <B,D> Added missing handling of encodings to various places. Report and patch by geballin <[email protected]>, with thanks. check-in: b09616777a user: aku tags: tcllib-1-19-rc
19:12
Tkt [c247ed5db4] ldap/ldap <B,D>. Merge of fix for protocol error, into release prep. check-in: 2f3369f04b user: aku tags: tcllib-1-19-rc
19:04
Tkt [a7fb3a643c] math/math::exact <B> Cleanup of variable access, prep for Tcl 9 / TIP 278 variable resolution changes. check-in: fb859d7803 user: aku tags: tcllib-1-19-rc
2017-11-01
22:48
Ticket [c247ed5db4]. Fixed handling of partial reception. Thanks to [email protected] for report and patch. Bumped version to 1.9.2. Note, this may fix tickets [b9a39c02c7] and [5f4f30667b] as well. Ping their reporters. Closed-Leaf check-in: 8b8f10e2bb user: aku tags: fix-ldap-partial
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/ldap/ldap.man.
1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.9.1]
[manpage_begin ldap n [vset VERSION]]
[keywords {directory access}]
[keywords internet]
[keywords ldap]
[keywords {ldap client}]
[keywords protocol]
[keywords {rfc 2251}]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.9.2]
[manpage_begin ldap n [vset VERSION]]
[keywords {directory access}]
[keywords internet]
[keywords ldap]
[keywords {ldap client}]
[keywords protocol]
[keywords {rfc 2251}]
Changes to modules/ldap/ldap.tcl.
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#   written by Jochen Loewer
#   3 June, 1999
#
#-----------------------------------------------------------------------------

package require Tcl 8.4
package require asn 0.7
package provide ldap 1.9.1

namespace eval ldap {

    namespace export    connect secure_connect  \
                        disconnect              \
                        bind unbind             \
                        bindSASL                \







|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#   written by Jochen Loewer
#   3 June, 1999
#
#-----------------------------------------------------------------------------

package require Tcl 8.4
package require asn 0.7
package provide ldap 1.9.2

namespace eval ldap {

    namespace export    connect secure_connect  \
                        disconnect              \
                        bind unbind             \
                        bindSASL                \
764
765
766
767
768
769
770
771




772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
                    CleanupWaitingMessages $handle
                    set conn(lastError) [format "Expected SEQUENCE (0x30) but got %x" $type]
                    return
                } else {
                    set conn(pdu,partial) 1
                    append conn(pdu,received) $type
                }
                }




            eof {
                CleanupWaitingMessages $handle
                set conn(lastError) "Server closed connection"
                catch {close $conn(sock)}
                return
            }
            default {
                CleanupWaitingMessages $handle
                set bytes $type[read $conn(sock)]
                binary scan $bytes h* values
                set conn(lastError) [format \
                    "Error reading SEQUENCE response for handle %s : %s : %s" $handle $code $values]
                return
                }
        }
    }


    # fetch the length
    if {[::info exists conn(pdu,length)] && $conn(pdu,length) >= 0} {
        # we already have a decoded length
    } else {
        if {[::info exists conn(pdu,length)] && $conn(pdu,length) < 0} {
            # we already know the length, but have not received enough bytes to decode it







|
>
>
>
>
|










|

|


<







764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791

792
793
794
795
796
797
798
                    CleanupWaitingMessages $handle
                    set conn(lastError) [format "Expected SEQUENCE (0x30) but got %x" $type]
                    return
                } else {
                    set conn(pdu,partial) 1
                    append conn(pdu,received) $type
                }
	    }
	    partial {
		# See ticket https://core.tcl.tk/tcllib/tktview/c247ed5db42e373470bf8a6302717e76eb3c6106
		return
	    }
	    eof {
                CleanupWaitingMessages $handle
                set conn(lastError) "Server closed connection"
                catch {close $conn(sock)}
                return
            }
            default {
                CleanupWaitingMessages $handle
                set bytes $type[read $conn(sock)]
                binary scan $bytes h* values
                set conn(lastError) [format \
					 "Error reading SEQUENCE response for handle %s : %s : %s" $handle $code $values]
                return
	    }
        }
    }


    # fetch the length
    if {[::info exists conn(pdu,length)] && $conn(pdu,length) >= 0} {
        # we already have a decoded length
    } else {
        if {[::info exists conn(pdu,length)] && $conn(pdu,length) < 0} {
            # we already know the length, but have not received enough bytes to decode it
Changes to modules/ldap/pkgIndex.tcl.
1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded ldap 1.9.1 [list source [file join $dir ldap.tcl]]

# the OO level wrapper for ldap
package ifneeded ldapx 1.0 [list source [file join $dir ldapx.tcl]]



|



1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded ldap 1.9.2 [list source [file join $dir ldap.tcl]]

# the OO level wrapper for ldap
package ifneeded ldapx 1.0 [list source [file join $dir ldapx.tcl]]
Changes to support/releases/history/README-1.19.md.
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|http|autoproxy|1.5.3|1.6|D EF T|
||||||
|httpd|httpd|4.0|4.0.1|B I T|
||httpd::content|4.0|4.0.1|B I|
||scgi::app|0.1|0.2|B T|
||||||
|json|json|1.3.3|1.3.4|B D T|
|ldap|ldap|1.8|1.9.1|B D T|
||||||
|math|math::calculus|0.8.1|0.8.2|B T|
||math::exact|1.0|1.0.1|B D T|
||math::geometry|1.1.3|1.2.3|B D EF I T|
||math::interpolate|1.1|1.1.1|B T|
||math::linearalgebra|1.1.5|1.1.6|B T|
||math::numtheory|1.0|1.1|D EF T|







|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|http|autoproxy|1.5.3|1.6|D EF T|
||||||
|httpd|httpd|4.0|4.0.1|B I T|
||httpd::content|4.0|4.0.1|B I|
||scgi::app|0.1|0.2|B T|
||||||
|json|json|1.3.3|1.3.4|B D T|
|ldap|ldap|1.8|1.9.2|B D T|
||||||
|math|math::calculus|0.8.1|0.8.2|B T|
||math::exact|1.0|1.0.1|B D T|
||math::geometry|1.1.3|1.2.3|B D EF I T|
||math::interpolate|1.1|1.1.1|B T|
||math::linearalgebra|1.1.5|1.1.6|B T|
||math::numtheory|1.0|1.1|D EF T|
Changes to support/releases/history/README-1.19.txt.
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    http               autoproxy                   1.5.3       1.6       D EF T
    ------------------ --------------------------- ----------- --------- --------------
    httpd              httpd                       4.0         4.0.1     B I T
                       httpd::content              4.0         4.0.1     B I
                       scgi::app                   0.1         0.2       B T
    ------------------ --------------------------- ----------- --------- --------------
    json               json                        1.3.3       1.3.4     B D T
    ldap               ldap                        1.8         1.9.1     B D T
    ------------------ --------------------------- ----------- --------- --------------
    math               math::calculus              0.8.1       0.8.2     B T
                       math::exact                 1.0         1.0.1     B D T
                       math::geometry              1.1.3       1.2.3     B D EF I T
                       math::interpolate           1.1         1.1.1     B T
                       math::linearalgebra         1.1.5       1.1.6     B T
                       math::numtheory             1.0         1.1       D EF T







|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    http               autoproxy                   1.5.3       1.6       D EF T
    ------------------ --------------------------- ----------- --------- --------------
    httpd              httpd                       4.0         4.0.1     B I T
                       httpd::content              4.0         4.0.1     B I
                       scgi::app                   0.1         0.2       B T
    ------------------ --------------------------- ----------- --------- --------------
    json               json                        1.3.3       1.3.4     B D T
    ldap               ldap                        1.8         1.9.2     B D T
    ------------------ --------------------------- ----------- --------- --------------
    math               math::calculus              0.8.1       0.8.2     B T
                       math::exact                 1.0         1.0.1     B D T
                       math::geometry              1.1.3       1.2.3     B D EF I T
                       math::interpolate           1.1         1.1.1     B T
                       math::linearalgebra         1.1.5       1.1.6     B T
                       math::numtheory             1.0         1.1       D EF T