summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-09 10:18:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-09 10:18:11 +0000
commit45be04cb62be3f8fbbe1d67fd25d4954a404f1e2 (patch)
tree604d7949e25bc7a3eeb0db6226aa2412fe5fd097
parent624cdea92a6d8b1fc20de026596245f36a391280 (diff)
downloadredmine-45be04cb62be3f8fbbe1d67fd25d4954a404f1e2.tar.gz
redmine-45be04cb62be3f8fbbe1d67fd25d4954a404f1e2.zip
Stringify the attribute value before #force_enconding (#21453).
git-svn-id: http://svn.redmine.org/redmine/trunk@15025 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/auth_source_ldap.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb
index 696d6219d..b18b657b0 100644
--- a/app/models/auth_source_ldap.rb
+++ b/app/models/auth_source_ldap.rb
@@ -198,7 +198,7 @@ class AuthSourceLdap < AuthSource
def self.get_attr(entry, attr_name)
if !attr_name.blank?
value = entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
- value.force_encoding('UTF-8')
+ value.to_s.force_encoding('UTF-8')
end
end
end