Project

General

Profile

Actions

Feature #12811

closed

ASCII-8BIT to UTF-8 problems -update net-ldap with net-ldap-1 -v0.4.0

Added by Terence Mill almost 12 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
LDAP
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

There are net-ldap charset bugs which hit when using the library far redmnine usage, e.g in redmine_ldap_sync plugin

The bug is solved in net-ldap-1 -v 0.4.0

Please upgrade and testbed.


Related issues

Related to Redmine - Feature #17618: Upgrade net-ldap version to 0.12.0Closed

Actions
Related to Redmine - Defect #21453: LDAP account creation fails when first name/last name contain non ASCIIClosedJean-Philippe Lang

Actions
Actions #1

Updated by Miodrag Milic almost 12 years ago

+1.

You also cant add it to the Gemfile.local so u need to change it after each update.

Actions #2

Updated by Ricardo S almost 12 years ago

+1

Actions #3

Updated by Etienne Massip almost 12 years ago

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.

Actions #4

Updated by Jean-Philippe Lang almost 12 years ago

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

Actions #5

Updated by Terence Mill almost 12 years ago

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.

Actions #6

Updated by Terence Mill almost 12 years ago

Please pull this patch into the next release, as redmine_ldap_sync is a major plugin and without in some cases unsuable.

Actions #7

Updated by Ricardo S almost 12 years ago

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.

Actions #9

Updated by Etienne Massip over 10 years ago

Actions #10

Updated by Jan from Planio www.plan.io about 9 years ago

  • 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.

Actions #11

Updated by Toshi MARUYAMA about 9 years ago

  • Category changed from Gems support to LDAP
Actions #12

Updated by Toshi MARUYAMA about 9 years ago

  • Related to Defect #21453: LDAP account creation fails when first name/last name contain non ASCII added
Actions #13

Updated by Toshi MARUYAMA over 4 years ago

  • Status changed from New to Closed

r14783 : 0.3 -> 0.10
r14784 : 0.10 -> 0.12

Actions

Also available in: Atom PDF