From 6685661b549cdece3b93131af168b5174bc0403f Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 11 Feb 2015 14:12:43 +0100 Subject: Clean username acquired from OAuth/LDAP. Fixes #1967. --- lib/gitlab/oauth/user.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1