Unable to edit groups with a dot in the name
Summary
If a group contains a dot (.) in the name, the UI will throw a 500 error when attempting to access/edit the group.
Steps to reproduce
Create a group with a dot in the name (example jim.test)
- 500 error is received but group is created Return to Groups screen from the Admin Area and click on the group name (jim.test)
- 500 error is received Edit the group with a dot in the name, make a change and save
- 500 error is received Delete the group with a dot in the name
- 500 error is received but the group is not removed.
Expected behavior
No 500 error should be displayed when modifying/creating a group through the UI with a dot in the name.
Actual behavior
A 500 error is received.
Relevant logs and/or screenshots
==> /var/log/gitlab/gitlab-rails/production.log <== Started GET "/admin/groups/jim.test" for 157.154.192.119 at 2016-12-27 10:47:43 -0500 Processing by Admin::GroupsController#show as Parameters: {"id"=>"jim"} Completed 500 Internal Server Error in 30ms (ActiveRecord: 3.2ms)
NoMethodError (undefined method members' for nil:NilClass): app/controllers/admin/groups_controller.rb:12:in
show'
lib/gitlab/middleware/multipart.rb:93:in call' lib/gitlab/request_profiler/middleware.rb:15:in
call'
lib/gitlab/middleware/go.rb:16:in call' lib/gitlab/middleware/readonly_geo.rb:29:in
call'
==> /var/log/gitlab/gitlab-workhorse/current <== 2016-12-27_15:47:43.43300 2016/12/27 10:47:43 ErrorPage: serving predefined error page: 500 2016-12-27_15:47:43.43302 @ - - [2016-12-27 10:47:43.387053117 -0500 EST] "GET /admin/groups/jim.test HTTP/1.1" 500 2648 "https:///admin/groups" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36" 0.045799
==> /var/log/gitlab/nginx/gitlab_access.log <== 157.154.192.119 - - [27/Dec/2016:10:47:43 -0500] "GET /admin/groups/jim.test HTTP/1.1" 500 2648 "https:///admin/groups" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36"
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 4.1.1 ? ... OK (4.1.1) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:git? default... no User id for git: 166. Groupd id for git: 150 Try fixing it: sudo chown -R git:git /var/opt/gitlab/git-data/repositories For more information see: doc/install/installation.md in section "GitLab Shell" Please fix the error above and rerun the checks. Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 12/1 ... ok 14/2 ... ok 15/3 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Access to /var/opt/gitlab/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results)
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory setup correctly? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. 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: ... 12/1 ... yes 14/2 ... yes 15/3 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.1.0 ? ... yes (2.3.3) Your git bin path is "/opt/gitlab/embedded/bin/git" Git version >= 2.7.3 ? ... yes (2.8.4) Active users: 8
Checking GitLab ... Finished
Results of GitLab environment info
lnbrgitd02|/var/log/gitlab# gitlab-rake gitlab:env:info
System information System: Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.6.6 Bundler Version:1.13.6 Rake Version: 10.5.0 Sidekiq Version:4.2.7
GitLab information Version: 8.15.1-ee Revision: 3e62eeed Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 9.2.18 URL: https://gitlabtest.highmark.com HTTP Clone URL: https://gitlabtest.highmark.com/some-group/some-project.git SSH Clone URL: git@gitlabtest.highmark.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 4.1.1 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/ Git: /opt/gitlab/embedded/bin/git