Project

General

Profile

Defect #20703 » 0001-Fix-exception-apperas-when-LDAP-attribute-contains-n.patch

Patch - Фёдор Патлин, 2015-12-23 11:27

View differences:

app/models/auth_source_ldap.rb
148 148
  def get_user_attributes_from_ldap_entry(entry)
149 149
    {
150 150
     :dn => entry.dn,
151
     :firstname => AuthSourceLdap.get_attr(entry, self.attr_firstname),
152
     :lastname => AuthSourceLdap.get_attr(entry, self.attr_lastname),
151
     :firstname => AuthSourceLdap.get_attr(entry, self.attr_firstname).force_encoding("UTF-8"),
152
     :lastname => AuthSourceLdap.get_attr(entry, self.attr_lastname).force_encoding("UTF-8"),
153 153
     :mail => AuthSourceLdap.get_attr(entry, self.attr_mail),
154 154
     :auth_source_id => self.id
155 155
    }
    (1-1/1)