Feature #12811
closed
+1.
You also cant add it to the Gemfile.local so u need to change it after each update.
net-ldap-1 is actually not the same gem but a gem specifically bundled for this fix ; the problem has been fixed in net-ldap master but is maybe not to be released soon because project has become inactive since then.
Jean-Philippe Lang wrote:
Sad to see that there's no stable gem for using LDAP. I would prefer to include the patch in Redmine rather than switching to this gem. Does this single fix below solve the encoding problems?
https://github.com/ruby-ldap/ruby-net-ldap/pull/44/files
Yes, that shall fix it.
Please pull this patch into the next release, as redmine_ldap_sync is a major plugin and without in some cases unsuable.
In the meanwhile I've included the following patch on the ldap_sync plugin.
require 'net/ldap'
module Net::BER::Extensions::String
def raw_utf8_encoded
if self.respond_to?(:encode) && self.encoding.name != 'ASCII-8BIT'
self.encode('UTF-8').force_encoding('ASCII-8BIT')
else
self
end
end
end
If it gets integrated on the next release I'll remove it.
- Description updated (diff)
Removing link to net-ldap-1
. Please note the -1
at the end -- it's not the official gem!
Using it instead of the proper net-ldap
gem as specified in Redmine's Gemfile
can lead to a severe authentication bypass scenario under certain circumstances because net-ldap-1
changes how successful or unsuccessful authentication is reported back to the caller (Redmine).
Please do not use net-ldap-1
and wait (or help work on) a proper fix for this in Redmine.
- Category changed from Gems support to LDAP
- Related to Defect #21453: LDAP account creation fails when first name/last name contain non ASCII added
- Status changed from New to Closed
Also available in: Atom
PDF