Skip to content

Exception when uploading Gitlab license file

Summary

When attempting to upload a .gitlab-license file a nil exception is thrown. No such exception occurs when copy-pasting the license key, only when using file upload.

It appears gitlab-license hasn't been updated since 2016 so this is likely a regression.

Steps to reproduce

  1. Generate license https://license.gitlab.com
  2. Navigate to Admin dashboard license page; i.e. http://localhost:3001/admin/license
  3. Select "Upload New License"
  4. Choose Upload .gitlab-license file and select file
  5. See undefined method 'split' for nil:NilClass exception

Example Project

Present on master branch of https://gitlab.com/gitlab-org/gitlab-ee

What is the current bug behavior?

undefined method 'split' for nil:NilClass thrown on license file upload

What is the expected correct behavior?

License should upload successfully

Relevant logs and/or screenshots

Image_2019-01-03_at_15.35.30

Output of checks

N/A

Results of GitLab environment info

N/A

Results of GitLab application Check

N/A

Possible fixes