Username availability checking is not respecting relative root
Summary
Username availability checking is not respecting relative root, causing the check to fail and an error message to show.
Steps to reproduce
- Install GitLab in the subfolder
/gitlab
. - Open the account registration page.
- Enter a username.
Expected behavior
GitLab should indicate whether the username is taken.
The request to check that is sent to /gitlab/users/<username>/exists
.
Actual behavior
The request is sent to /users/<username>/exists
, which does not belong to GitLab.
If the server responds with a 404
, Something went wrong on our end.
is shown.
Output of checks
Results of GitLab application Check
I'm using the docker container, running the check inside the container yields:
Checking GitLab Shell ...
GitLab Shell version >= 4.0.3 ? ... OK (4.0.3)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
2/1 ... ok
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 ...
LDAP is disabled in config/gitlab.yml
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? ... yes
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: ...
2/1 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 3
Checking GitLab ... Finished
Results of GitLab environment info
I censored my domain to read example.com
, without altering any paths:
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:1.13.6
Rake Version: 10.5.0
Sidekiq Version:4.2.1
GitLab information
Version: 8.14.4
Revision: 3ea6c8d
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://example.com/gitlab
HTTP Clone URL: https://example.com/gitlab/some-group/some-project.git
SSH Clone URL: ssh://git@example.com:2222/some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 4.0.3
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git