-
Notifications
You must be signed in to change notification settings - Fork 252
Encoding::UndefinedConversionError after upgrading from 0.2.2 to 0.3.1 #30
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
Comments
I've also run into this issue. The issue arrose from commit 3a8b8a2 in lib/net/ber/core_ext/string.rb The to_ber method calls raw_utf8_encoded which encodes the string and breaks binary searching. |
yes I have the issue, too. How to fix the issues in v0.3.1? |
+1 |
This problem seems to come from a confusion between LDAPString and BERString. I think issue #31,#33 and #41 are all related to this. Roryo asks on #31 : "why doesn't Net::BER::Extensions::String isn't UTF-8?" I think that's because BER String are used for two things :
From the issue above, we have at least two concrete examples of binary data :
IMO, BER should not bother with string encoding, and leave it either to the users to properly encode their strings, or to the LDAP methods. |
I run into this issue when trying to save some binary data (a jpeg photo) into our LDAP. Are there any news on this? Workaround? |
Used @justcfx2u version (#41) and it seems to work. |
Same issue here. This has been open for 5 months. Is this project dead? |
Looks like pull 41 got merged into master, so just waiting on a release... |
I am having the same problem. It looks like the owner of net-ldap needs to build a new version of this gem, because the 0.3.1 release does not include the fix from pull 41. I worked around this by explicitly using the last-known version of this gem that does NOT suffer from this issue, which is 0.2.2. For me, this is easier than the alternatives (building my own local copy of the current 0.5.0 gem, etc). And my goodness, the interweb is simply littered with ldap gems! myfile.rb:
|
It's solved since version 0.4.1 |
I have a model that uses net-ldap for communication to an Active Directory server, and after upgrading the gem from v0.2.2 to v0.3.1, I get a
Encoding::UndefinedConversionError
exception when binding and performing a query. When I downgrade to 0.2.2, the problem goes away instantly. It looks like it may be due to the recent changes to use UTF-8 string encoding by default.It seems that my application encounters this only when I am searching AD using a GUID, which would indicate that net-ldap is trying to convert the binary GUID to UTF-8.
The text was updated successfully, but these errors were encountered: