Skip to content

Commit f608b28

Browse files
committed
Fix rfx2696 cookie, it should use the to_ber_bin method because to_ber will try to encode to UTF-8 first and break the cookie's representation of binary data
1 parent 626c312 commit f608b28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net/ldap/connection.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def search(args = nil)
429429
Net::LDAP::LDAPControls::PAGED_RESULTS.to_ber,
430430
# Criticality MUST be false to interoperate with normal LDAPs.
431431
false.to_ber,
432-
rfc2696_cookie.map(&:to_ber).to_ber_sequence.to_s.to_ber,
432+
[rfc2696_cookie[0].to_ber, rfc2696_cookie[1].to_ber_bin].to_ber_sequence.to_ber_bin,
433433
].to_ber_sequence if paged
434434
controls << ber_sort if ber_sort
435435
controls = controls.empty? ? nil : controls.to_ber_contextspecific(0)

0 commit comments

Comments
 (0)