Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-13 03:39:34 +0300
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-13 03:39:34 +0300
commit2ff1b8e68d085a8b43507630b3986743d2a48145 (patch)
treef4bddd1e332478a8ff4c63d5cf29d7d55e621dce /lib
parentf9880c11f754c278cbd00eb34ea65e90160571db (diff)
parent6685661b549cdece3b93131af168b5174bc0403f (diff)
Merge branch 'clean-oauth-username' into 'master'
Clean username acquired from OAuth/LDAP. Fixes #1967. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/813 See merge request !1500
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