summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-11 14:12:43 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-12 21:05:27 +0100
commit6685661b549cdece3b93131af168b5174bc0403f (patch)
tree07daec6105e14e906dcdfb7fd1d01a5fb6b13289 /lib
parent2dfd21983483bd5fd32b327edb4b02228b377c47 (diff)
downloadgitlab-ce-6685661b549cdece3b93131af168b5174bc0403f.tar.gz
Clean username acquired from OAuth/LDAP.
Fixes #1967.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/oauth/user.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/oauth/user.rb b/lib/gitlab/oauth/user.rb
index 6861427864e..9f55e8c4950 100644
--- a/lib/gitlab/oauth/user.rb
+++ b/lib/gitlab/oauth/user.rb
@@ -85,11 +85,11 @@ module Gitlab
def user_attributes
{
- name: auth_hash.name,
- username: auth_hash.username,
- email: auth_hash.email,
- password: auth_hash.password,
- password_confirmation: auth_hash.password
+ name: auth_hash.name,
+ username: ::User.clean_username(auth_hash.username),
+ email: auth_hash.email,
+ password: auth_hash.password,
+ password_confirmation: auth_hash.password
}
end