Commit 369dbaf39687f079dec40df20f3be367ca6c3ac7

Authored by Dmitriy Zaporozhets
2 parents c9e6818a 93cb01ea

Merge pull request #1586 from Bregor/ber_to_string

Auth: Net::BER::BerIdentifiedStrings to Strings
Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
lib/gitlab/auth.rb
... ... @@ -20,8 +20,9 @@ module Gitlab
20 20 def create_from_omniauth(auth, ldap = false)
21 21 provider = auth.provider
22 22 uid = auth.info.uid || auth.uid
23   - name = auth.info.name.force_encoding("utf-8")
24   - email = auth.info.email.downcase unless auth.info.email.nil?
  23 + uid = uid.to_s.force_encoding("utf-8")
  24 + name = auth.info.name.to_s.force_encoding("utf-8")
  25 + email = auth.info.email.to_s.downcase unless auth.info.email.nil?
25 26  
26 27 ldap_prefix = ldap ? '(LDAP) ' : ''
27 28 raise OmniAuth::Error, "#{ldap_prefix}#{provider} does not provide an email"\
... ...