Skip to content

Error 422 The change you requested was rejected on login

Summary

Unable to login as root after upgrade to 9.4.

LDAP users can login without any issues.

I'm not using any proxies/reverse proxies to access gitlab, the only changes in gitlab.rb are gitlab_rails['time_zone'], external_url and gitlab_rails['ldap_servers']

Steps to reproduce

Upgrade. Try to login as "Standard signin"

What is the current bug behavior?

422

The change you requested was rejected.

What is the expected correct behavior?

successful login.

LDAP account can login without any issues.

Relevant logs and/or screenshots

Started POST "/users/sign_in" for 192.168.30.1 at 2017-07-23 13:40:39 +0700
Processing by SessionsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"1boCv+/IHaWdBfc6+KwcVaVZ8jll+t9COslYT3qtpK/gLzrEeAqRq6efbfhS67QKE3TLsEbp+6C6IW1yj7iswQ==", "user"=>{"login"=>"root", "password"=>"[FILTERED]", "remember_me"=>"0"}}
Started GET "/-/metrics" for 127.0.0.1 at 2017-07-23 13:40:39 +0700
Processing by MetricsController#index as HTML
Filter chain halted as :validate_prometheus_metrics rendered or redirected
Completed 404 Not Found in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
Can't verify CSRF token authenticity
Completed 422 Unprocessable Entity in 205ms (ActiveRecord: 11.8ms)

ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
  lib/gitlab/performance_bar/peek_performance_bar_with_rack_body.rb:16:in `call'
  lib/gitlab/middleware/multipart.rb:93:in `call'
  lib/gitlab/request_profiler/middleware.rb:14:in `call'
  lib/gitlab/middleware/go.rb:16:in `call'
  lib/gitlab/etag_caching/middleware.rb:11:in `call'
  lib/gitlab/request_context.rb:18:in `call'
  lib/gitlab/metrics/connection_rack_middleware.rb:31:in `call'

I've checked HTTP transmissions, authenticity_token is the same as in <meta name="csrf-token" tag.

Incorrect password causes valid error "Invalid Login or password."

Results of GitLab environment info

System information
System:		Ubuntu 14.04
Current User:	git
Using RVM:	no
Ruby Version:	2.3.3p222
Gem Version:	2.6.6
Bundler Version:1.13.7
Rake Version:	10.5.0
Redis Version:	3.2.5
Git Version:	2.13.0
Sidekiq Version:5.0.0
Go Version:	unknown

GitLab information
Version:	9.4.0
Revision:	9bbe2ac
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
URL:		http://git.FILTERED.com
HTTP Clone URL:	http://git.FILTERED.com/some-group/some-project.git
SSH Clone URL:	git@git.FILTERED.com:some-group/some-project.git
Using LDAP:	yes
Using Omniauth:	no

GitLab Shell
Version:	5.3.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

Results of GitLab application Check

Checking GitLab Shell ...

GitLab Shell version >= 5.3.1 ? ... OK (5.3.1)
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
6/2 ... ok
2/3 ... ok
2/4 ... ok
6/6 ... ok
7/8 ... ok
7/9 ... ok
6/10 ... ok
9/11 ... ok
6/14 ... ok
13/15 ... ok
12/16 ... ok
15/17 ... ok
15/18 ... ok
18/19 ... repository is empty
15/20 ... ok
6/22 ... ok
15/23 ... ok
15/24 ... ok
7/25 ... ok
2/26 ... ok
17/27 ... ok
17/28 ... ok
23/30 ... ok
23/31 ... ok
12/33 ... ok
7/34 ... ok
7/35 ... ok
2/36 ... ok
9/38 ... ok
33/40 ... ok
33/41 ... ok
6/42 ... ok
3/43 ... ok
2/44 ... ok
6/45 ... ok
26/46 ... ok
35/47 ... ok
7/48 ... 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 ...

Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
    FILTERED

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: ...
6/1 ... yes
6/2 ... yes
2/3 ... yes
2/4 ... yes
6/6 ... yes
7/8 ... yes
7/9 ... yes
6/10 ... yes
9/11 ... yes
6/14 ... yes
13/15 ... yes
12/16 ... yes
15/17 ... yes
15/18 ... yes
18/19 ... yes
15/20 ... yes
6/22 ... yes
15/23 ... yes
15/24 ... yes
7/25 ... yes
2/26 ... yes
17/27 ... yes
17/28 ... yes
23/30 ... yes
23/31 ... yes
12/33 ... yes
7/34 ... yes
7/35 ... yes
2/36 ... yes
9/38 ... yes
33/40 ... yes
33/41 ... yes
6/42 ... yes
3/43 ... yes
2/44 ... yes
6/45 ... yes
26/46 ... yes
35/47 ... yes
7/48 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.3.3)
Git version >= 2.7.3 ? ... yes (2.13.0)
Active users: ... 20

Checking GitLab ... Finished
Edited by Sergey Stolyarov