Commit 93cb01ea9b620762c1641b585de153a686067d4d
1 parent
a79eb842
Exists in
master
and in
4 other branches
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,8 +20,9 @@ module Gitlab | ||
20 | def create_from_omniauth(auth, ldap = false) | 20 | def create_from_omniauth(auth, ldap = false) |
21 | provider = auth.provider | 21 | provider = auth.provider |
22 | uid = auth.info.uid || auth.uid | 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 | ldap_prefix = ldap ? '(LDAP) ' : '' | 27 | ldap_prefix = ldap ? '(LDAP) ' : '' |
27 | raise OmniAuth::Error, "#{ldap_prefix}#{provider} does not provide an email"\ | 28 | raise OmniAuth::Error, "#{ldap_prefix}#{provider} does not provide an email"\ |