Can not login with ldap which includes the attribute "cn;lang-jp"

Summary

Can not login with ldap which includes the attribute "cn;lang-jp"

Steps to reproduce

  1. Login with ldap auth, and its ldap server includes the attribute "cn;lang-jp"

What is the current bug behavior?

Cannot login, and the error message below appears.
https://gitlab.com/gitlab-org/gitlab-ce/blob/74da79113bb2eb7363403d7c2a9f1e0624590b74/lib/gitlab/ldap/person.rb#L128

What is the expected correct behavior?

Can login with ldap includes the attribute "cn;lang-jp".

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:
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.4.0 Revision: 128ef10 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://*** HTTP Clone URL: https:///some-group/some-project.git SSH Clone URL: git@:some-group/some-project.git Using LDAP: yes Using Omniauth: no

GitLab Shell Version: 5.11.0 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 >= 5.11.0 ? ... OK (5.11.0) 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: ... 21/12 ... repository is empty 21/13 ... ok 28/14 ... repository is empty 40/15 ... ok 40/16 ... ok 42/18 ... ok 42/19 ... ok 42/20 ... ok 19/22 ... repository is empty 42/23 ... ok 42/24 ... 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 ...

Server: ldapmain not verifying SSL hostname of LDAPS server '***:636' LDAP authentication... Anonymous. No bind_dn or password configured LDAP users with access to your GitLab server (only showing the first 100 results) ***

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: ... 21/12 ... yes 21/13 ... yes 28/14 ... yes 40/15 ... yes 40/16 ... yes 42/18 ... yes 42/19 ... yes 42/20 ... yes 19/22 ... yes 42/23 ... yes 42/24 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.7.3 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 26

Checking GitLab ... Finished

Possible fixes

https://gitlab.com/gitlab-org/gitlab-ce/blob/7d1fdcdc836921d2f2324265752107519f47a6de/lib/gitlab/ldap/person.rb#L119-130
may be causing the issue.

Ver10.3 was working without the issue.