diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-09 10:17:12 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-09 10:17:12 +0000 |
commit | 624cdea92a6d8b1fc20de026596245f36a391280 (patch) | |
tree | 3e749c41d6c106432b6e1290300e0d21e55a2811 /app/models/auth_source_ldap.rb | |
parent | 5e5506587e95b1981b7e913bf4e6b7b61c304bde (diff) | |
download | redmine-624cdea92a6d8b1fc20de026596245f36a391280.tar.gz redmine-624cdea92a6d8b1fc20de026596245f36a391280.zip |
LDAP account creation fails when first name/last name contain non ASCII (#21453).
Patch by Haihan Ji.
git-svn-id: http://svn.redmine.org/redmine/trunk@15024 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/auth_source_ldap.rb')
-rw-r--r-- | app/models/auth_source_ldap.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb index d5a8550c7..696d6219d 100644 --- a/app/models/auth_source_ldap.rb +++ b/app/models/auth_source_ldap.rb @@ -197,7 +197,8 @@ class AuthSourceLdap < AuthSource def self.get_attr(entry, attr_name) if !attr_name.blank? - entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name] + value = entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name] + value.force_encoding('UTF-8') end end end |