Commit 93cb01ea authored by Maxim Filatov's avatar Maxim Filatov

Auth: Net::BER::BerIdentifiedStrings to Strings

parent a79eb842
...@@ -20,8 +20,9 @@ module Gitlab ...@@ -20,8 +20,9 @@ module Gitlab
def create_from_omniauth(auth, ldap = false) def create_from_omniauth(auth, ldap = false)
provider = auth.provider provider = auth.provider
uid = auth.info.uid || auth.uid uid = auth.info.uid || auth.uid
name = auth.info.name.force_encoding("utf-8") uid = uid.to_s.force_encoding("utf-8")
email = auth.info.email.downcase unless auth.info.email.nil? name = auth.info.name.to_s.force_encoding("utf-8")
email = auth.info.email.to_s.downcase unless auth.info.email.nil?
ldap_prefix = ldap ? '(LDAP) ' : '' ldap_prefix = ldap ? '(LDAP) ' : ''
raise OmniAuth::Error, "#{ldap_prefix}#{provider} does not provide an email"\ raise OmniAuth::Error, "#{ldap_prefix}#{provider} does not provide an email"\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment