summaryrefslogtreecommitdiffstats
path: root/app/models/auth_source_ldap.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-09 10:17:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-09 10:17:12 +0000
commit624cdea92a6d8b1fc20de026596245f36a391280 (patch)
tree3e749c41d6c106432b6e1290300e0d21e55a2811 /app/models/auth_source_ldap.rb
parent5e5506587e95b1981b7e913bf4e6b7b61c304bde (diff)
downloadredmine-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.rb3
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