User deletion confirmation not enforced.
Summary
In the Gitlab CE Admin Area, on a user's page, 3 options are proposed on the right: block user, delete user and contributions.
Clicking on "delete user" presents a modal dialog which is supposed to check that we really want to delete the user: we have to type the user's name. Typing anything (not the user's name) and then pressing "Enter" deletes the user immediately.
Steps to reproduce
- Go to admin area
- Go to a user's page
- click "delete user" in the red panel on the right
- type "Hello" instead of the user's name (notice that the buttons are still greyed out)
- press "Enter"
- user is deleted
What is the current bug behavior?
The user is deleted despite the wrong confirmation being entered.
What is the expected correct behavior?
The user should not be deleted without confirmation.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 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: unknownGitLab information Version: 10.5.4 Revision: 8d768f9 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://gitlab.datadip.net HTTP Clone URL: https://gitlab.datadip.net/some-group/some-project.git SSH Clone URL: git@gitlab.datadip.net:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 6.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
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 6.0.3 ? ... OK (6.0.3) 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: ... 4/3 ... ok 4/5 ... ok 5/6 ... repository is empty 5/7 ... ok 6/8 ... ok 5/9 ... ok 7/11 ... ok 7/12 ... ok 7/13 ... ok 5/14 ... ok 5/15 ... ok 6/16 ... ok 5/17 ... ok 6/19 ... repository is empty 5/20 ... ok 4/21 ... repository is empty 5/22 ... ok 5/23 ... repository is empty 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? ... 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: ... 4/3 ... yes 4/5 ... yes 5/6 ... yes 5/7 ... yes 6/8 ... yes 5/9 ... yes 7/11 ... yes 7/12 ... yes 7/13 ... yes 5/14 ... yes 5/15 ... yes 6/16 ... yes 5/17 ... yes 6/19 ... yes 5/20 ... yes 4/21 ... yes 5/22 ... yes 5/23 ... 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: ... 3
Checking GitLab ... Finished