1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-22 08:49:55 +00:00

Stringify the attribute value before #force_enconding (#21453).

git-svn-id: http://svn.redmine.org/redmine/trunk@15025 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2016-01-09 10:18:11 +00:00
parent 624cdea92a
commit 45be04cb62

View File

@ -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