Skip to content

New filter type to allow searching of binary data #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 28, 2012

Conversation

DavidJLee
Copy link

Not sure if this is the best way to implement this. Another option would be to not throw an exception if a string can't be converted into UTF-8 and silently pass it along. I think creating a specific filter type when searching for non-standard data is the safer option.

I added a test to make sure binary data is represented properly.

This resolves issue #30, although would require application code to be re-written to use the new filter.

It's very important that Microsoft Active Directory can be searched for binary data, as this is the only way to search for GUIDs.

… NOT force

convert data to UTF-8. This is required for proper binary data filters in Microsoft
Active Directory.
@DavidJLee
Copy link
Author

I ran into another issue with Active Directory when doing searches...
The rfc2696_cookie for doing paged searches will sometimes have binary data in it. This will break when to_ber is called on it.
I worked around this by providing a configuration option to bypass paged searches.
Given the problem with GUID searching and this, maybe it would be better to just make to_ber fall back to skip encoding non-utf-8 data on an encoding error?

@coffeencoke
Copy link

THANK YOU!

took me forever to find anything that allowed me to query on objectguid. The only thing that was working before this was ruby 1.8.7 and ruby-net-ldap 0.0.4 :)

thanks.

@yairgo
Copy link

yairgo commented Apr 26, 2012

any reason why this hasn't been merged in yet?

@shanepinnell
Copy link

Will this be merged?

RoryO pushed a commit that referenced this pull request Aug 28, 2012
New filter type to allow searching of binary data
@RoryO RoryO merged commit b6d9fbe into ruby-ldap:master Aug 28, 2012
astratto pushed a commit to astratto/ruby-net-ldap that referenced this pull request Dec 18, 2015
New filter type to allow searching of binary data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants