Skip to content

Conversation

@jamuc
Copy link

@jamuc jamuc commented Jun 5, 2013

Stumbled across this error, while performing and LDAP search on a Microsoft Active Directory 2008 RC2 (AD).

This specific installation had been migrated form why back when (NT times).

In this case some binary data was being returned, which caused a "Encoding::ConverterNotFoundError" error to be thrown. Catching this error and returning self instead of trying to encode to "UTF-8" provides a workaround for the problem.

Unfortunately the AD in question doesn't belong to me, so I can't give you more specifics on the data returned.

This is the reason why I was unable to provide a test case for this fix.

Signed-off-by: Jason Franklin [email protected]

Some binary format on Active Directory can raise "Encoding::ConverterNotFoundError".

Signed-off-by: Jason Franklin <[email protected]>
RoryO pushed a commit that referenced this pull request Jul 22, 2013
Catch Encoding::ConverterNotFoundError
@RoryO RoryO merged commit 37736e1 into ruby-ldap:master Jul 22, 2013
@jamuc jamuc deleted the catch_converter_not_found_error branch July 22, 2013 07:31
@jamuc jamuc restored the catch_converter_not_found_error branch July 23, 2013 13:38
astratto pushed a commit to astratto/ruby-net-ldap that referenced this pull request Dec 18, 2015
…d_error

Catch Encoding::ConverterNotFoundError
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.

2 participants