]> source.dussan.org Git - redmine.git/commitdiff
Merged r15024 and r15025 (#21453).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 21 Jan 2016 04:41:49 +0000 (04:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 21 Jan 2016 04:41:49 +0000 (04:41 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15075 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/auth_source_ldap.rb

index d5a8550c7f41524809f06adf05bce2d83f514a84..b18b657b03f4067e66d8dcd4e522c3c77a0ebb08 100644 (file)
@@ -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.to_s.force_encoding('UTF-8')
     end
   end
 end