Skip to content

Commit

Permalink
Fix rfx2696 cookie, it should use the to_ber_bin method because to_be…
Browse files Browse the repository at this point in the history
…r will try to encode to UTF-8 first and break the cookie's representation of binary data
  • Loading branch information
amuta committed Jul 21, 2020
1 parent 8ef75a0 commit 92353e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net/ldap/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def search(args = nil)
Net::LDAP::LDAPControls::PAGED_RESULTS.to_ber,
# Criticality MUST be false to interoperate with normal LDAPs.
false.to_ber,
rfc2696_cookie.map(&:to_ber).to_ber_sequence.to_s.to_ber,
[rfc2696_cookie[0].to_ber, rfc2696_cookie[1].to_ber_bin].to_ber_sequence.to_s.to_ber,
].to_ber_sequence if paged
controls << ber_sort if ber_sort
controls = controls.empty? ? nil : controls.to_ber_contextspecific(0)
Expand Down

0 comments on commit 92353e9

Please sign in to comment.