プロジェクト

全般

プロフィール

Vote #71391

完了

Ruby 1.9.3: "incompatible character encoding" with LDAP auth

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
LDAP_28
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
28
version_id:
40
issue_org_id:
10272
author_id:
10581
assigned_to_id:
1
comments:
5
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I'm running trunk Redmine (r8903 as we speak) with ruby 1.9.3 and Rails 2.3.14.
If logging in with a user who is authenticated through LDAP, I get an "incompatible encoding" error.
Upgrading to net-ldap-0.3.1 solves the problem.

Log is as follows:

Processing AccountController#login (for 192.168.0.154 at 2012-02-18 14:48:27) [POST]
Parameters: {"authenticity_token"=>"[FILTERED]", "back_url"=>"[FILTERED]", "username"=>"[FILTERED]", "password"=>"[FILTERED]", "login"=>"[FILTERED]", "controller"=>"account", "action"=>"login"}

Encoding::CompatibilityError (incompatible character encodings: UTF-8 and ASCII-8BIT):
/usr/local/lib/ruby/gems/1.9.1/gems/net-ldap-0.2.2/lib/net/ber/core_ext/array.rb:61:in join'
/usr/local/lib/ruby/gems/1.9.1/gems/net-ldap-0.2.2/lib/net/ber/core_ext/array.rb:61:in
to_ber_seq_internal'
/usr/local/lib/ruby/gems/1.9.1/gems/net-ldap-0.2.2/lib/net/ber/core_ext/array.rb:43:in to_ber_appsequence'
/usr/local/lib/ruby/gems/1.9.1/gems/net-ldap-0.2.2/lib/net/ldap.rb:1374:in
block in search'
/usr/local/lib/ruby/gems/1.9.1/gems/net-ldap-0.2.2/lib/net/ldap.rb:1361:in loop'
/usr/local/lib/ruby/gems/1.9.1/gems/net-ldap-0.2.2/lib/net/ldap.rb:1361:in
search'
/usr/local/lib/ruby/gems/1.9.1/gems/net-ldap-0.2.2/lib/net/ldap.rb:635:in search'
app/models/auth_source_ldap.rb:110:in
get_user_dn'
app/models/auth_source_ldap.rb:37:in authenticate'
app/models/user.rb:142:in
try_to_login'
app/controllers/account_controller.rb:149:in password_authentication'
app/controllers/account_controller.rb:144:in
authenticate_user'
app/controllers/account_controller.rb:31:in login'
<internal:prelude>:10:in
synchronize'
thin (1.3.1) lib/thin/connection.rb:80:in block in pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in
catch'
thin (1.3.1) lib/thin/connection.rb:78:in pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in
process'
thin (1.3.1) lib/thin/connection.rb:38:in receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in
run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in run'
thin (1.3.1) lib/thin/backends/base.rb:61:in
start'
thin (1.3.1) lib/thin/server.rb:159:in start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in
start'
thin (1.3.1) lib/thin/runner.rb:185:in run_command'
thin (1.3.1) lib/thin/runner.rb:151:in
run!'
thin (1.3.1) bin/thin:6:in <top (required)>'
/usr/local/bin/thin:19:in
load'
/usr/local/bin/thin:19:in `

'

Rendering /xxxxxxxxxx/public/500.html (500 Internal Server Error)


journals

--------------------------------------------------------------------------------
Seems to have been "fixed with 0.3.0":https://github.com/ruby-ldap/ruby-net-ldap/blob/master/History.rdoc but the author didn't tag 0.3.0 or 0.3.1.

Guess it could be included with version:1.4.0 though?
--------------------------------------------------------------------------------
ummm... I have forgotten to [FILTER] out the path in the last line. Could someone with appropriate rights do the modification? Thanks!
--------------------------------------------------------------------------------
Done.
--------------------------------------------------------------------------------
Committed in r8908.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリLDAP_28 にセット
  • 対象バージョン1.4.0_40 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0