Adding new user with special characters in username fails with error 500

Summary

When I add a new new use as Admin and choose a username with special charcaters, it is not possible to save. Instead a page with Error 500 is shown.

Steps to reproduce

  • Install GitLab Enterprise Edition 10.6.3-ee
  • Open Admin Area with User List http://gitlab.example.com/admin/users
  • Click »New user« Button (http://gitlab.example.com/admin/users/new)
  • Type pötzsch as username (or any other german umlaut like öäü)
  • Hit »Create user«
  • → Shows 500 error page

What is the current bug behavior?

  • Shows error page 500

What is the expected correct behavior?

  • Either show a validation error "Username not allowed"
  • …or create the user and show a success message

Relevant logs and/or screenshots

production.log

Processing by Admin::UsersController#create as HTML

Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "user"=>{"name"=>"Axel Pötzsch", "username"=>"pötzsch", "email"=>"poetzsch@example.com", "projects_limit"=>"100000", "can_create_group"=>"1", "access_level"=>"regular", "external"=>"0", "skype"=>"", "linkedin"=>"", "twitter"=>"", "website_url"=>"", "note"=>""}}

Completed 500 Internal Server Error in 308ms (ActiveRecord: 5.2ms | Elasticsearch: 0.0ms)

ActionView::Template::Error (No route matches {:action=>"reset_runners_minutes", :controller=>"admin/users", :id=>#<User id: @pötzsch>} missing required keys: [:id]):

5: = render 'namespaces/shared_runners_minutes_setting', f: namespace_form

Results of GitLab environment info

gitlab-rake gitlab:env:info

System information
System:		Ubuntu 16.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.3.6p384
Gem Version:	2.6.13
Bundler Version:1.13.7
Rake Version:	12.3.0
Redis Version:	3.2.11
Git Version:	2.14.3
Sidekiq Version:5.0.5
Go Version:	unknown

GitLab information
Version:	10.6.3-ee
Revision:	8b1a92e
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
DB Version:	9.6.8
URL:		http://xxx.example.com
HTTP Clone URL:	http://xxx.example.com/some-group/some-project.git
SSH Clone URL:	git@xxx.example.com:some-group/some-project.git
Elasticsearch:	no
Geo:		no
Using LDAP:	no
Using Omniauth:	no

GitLab Shell
Version:	6.0.4
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks
Git:		/opt/gitlab/embedded/bin/git

Results of GitLab application Check

gitlab-rake gitlab:check SANITIZE=true

Checking GitLab Shell ...

GitLab Shell version >= 6.0.4 ? ... OK (6.0.4)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ... 
6/1 ... ok
7/2 ... ok
2/3 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml
Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet)
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ... 
6/1 ... yes
7/2 ... yes
2/3 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.5 ? ... yes (2.3.6)
Git version >= 2.9.5 ? ... yes (2.14.3)
Git user has default SSH configuration? ... yes
Active users: ... 6
Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Possible fixes

¯_(ツ)_/¯

Assignee Loading
Time tracking Loading