500 Internal Server Error: Branch from integer ref

Summary

500 Internal Server Error when creating a branch from integer ref.

Example

curl -v -X 'POST'  -H "Content-Type: application/json" -H 'PRIVATE-TOKEN: NXuzbfpruit7PNyXTuH7' 'http://127.0.0.1/api/v4/projects' -d '{"name":"project1"}' 
curl -v -X 'POST'  -H "Accept: application/json" -H "Content-Type: application/json" -H 'PRIVATE-TOKEN: NXuzbfpruit7PNyXTuH7' 'http://127.0.0.1/api/v4/projects/5/repository/branches' -d '{"ref":0, "branch":"a-random-string"}'

Example Project

The bug is reproducible on "gitlab.com" and on our local deployment with source code installation of enterprise edition (13-0-stable branch).

What is the current bug behavior?

HTTP Response: "500 Internal Server Error."

What is the expected correct behavior?

HTTP Response: "400 Bad Request: {"message":"Invalid reference name: 0"}"

Relevant logs and/or screenshots

==> /home/git/gitlab/log/production.log <==                                                                                                                                                                                                   
Started POST "/api/v4/projects/5/repository/branches" for 127.0.0.1 at 2020-06-12 09:05:32 +0000                                                                                                                                              
                                                                                                                                                                                                                                              
==> /home/git/gitlab/log/gitaly.log <==                                                                                                                                                                                                       
time="2020-06-12T09:05:32Z" level=info msg="diskcache state change" correlation_id=4YvGhkHP3ca diskcache=d0c2bf7e-1337-4662-b078-fa3030a40970 grpc.meta.auth_version=v2 grpc.meta.client_name=gitlab-web grpc.meta.deadline_type=regular grpc.
method=UserCreateBranch grpc.request.deadline="2020-06-12T09:06:27Z" grpc.request.fullMethod=/gitaly.OperationService/UserCreateBranch grpc.request.glProjectPath=root/project1 grpc.request.glRepository=project-5 grpc.request.repoPath=@has
hed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.git grpc.request.repoStorage=default grpc.request.topLevelGroup=@hashed grpc.service=gitaly.OperationService grpc.start_time="2020-06-12T09:05:32Z" peer.address=@ 
pid=15909 span.kind=server system=grpc                                                                                                                                                                                                        
time="2020-06-12T09:05:32Z" level=error msg="finished unary call with code Unknown" correlation_id=4YvGhkHP3ca error="rpc error: code = Unknown desc = Rugged::ObjectError: ambiguous lookup - OID prefix is too short" grpc.code=Unknown grpc
.meta.auth_version=v2 grpc.meta.client_name=gitlab-web grpc.meta.deadline_type=regular grpc.method=UserCreateBranch grpc.request.deadline="2020-06-12T09:06:27Z" grpc.request.fullMethod=/gitaly.OperationService/UserCreateBranch grpc.reques
t.glProjectPath=root/project1 grpc.request.glRepository=project-5 grpc.request.repoPath=@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.git grpc.request.repoStorage=default grpc.request.topLevelGroup=@hashed
 grpc.service=gitaly.OperationService grpc.start_time="2020-06-12T09:05:32Z" grpc.time_ms=6.232 peer.address=@ pid=15909 span.kind=server system=grpc                                                                                         
                                                                                                                                                                                                                                              
==> /home/git/gitlab/log/exceptions_json.log <==                                                                                                                                                                                              
{"severity":"ERROR","time":"2020-06-12T09:05:32.471Z","correlation_id":"4YvGhkHP3ca","tags.correlation_id":"4YvGhkHP3ca","tags.locale":"en","user.id":1,"user.email":"admin@example.com","user.username":"root","extra.server":{"os":{"name":"
Linux","version":"#28~18.04.1-Ubuntu SMP Sat Jun 6 00:09:26 UTC 2020","build":"5.3.0-1026-gcp","kernel_version":"Linux gitlab-bugreports-test-instance 5.3.0-1026-gcp #28~18.04.1-Ubuntu SMP Sat Jun 6 00:09:26 UTC 2020 x86_64 x86_64 x86_64 
GNU/Linux"},"runtime":{"name":"ruby","version":"ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]"}},"extra.ref":0,"extra.branch":"a-random-string","exception.class":"Gitlab::Git::CommandError","exception.message":"2:Rugged::Objec
tError: ambiguous lookup - OID prefix is too short","exception.backtrace":["lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'","lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'","lib/gitlab/gi
t/repository.rb:550:in `add_branch'","app/models/repository.rb:207:in `add_branch'","app/services/branches/create_service.rb:12:in `execute'","lib/api/branches.rb:143:in `block (2 levels) in \u003cclass:Branches\u003e'"]}                 
                                                                                                                                                                                                                                              
==> /home/git/gitlab/log/production.log <==                                              

                                                                                                                                                                                                                                              
Gitlab::Git::CommandError (2:Rugged::ObjectError: ambiguous lookup - OID prefix is too short):
  /home/git/gitlab/lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
  /home/git/gitlab/lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
  /home/git/gitlab/lib/gitlab/git/repository.rb:550:in `add_branch'
  /home/git/gitlab/app/models/repository.rb:207:in `add_branch'
  /home/git/gitlab/app/services/branches/create_service.rb:12:in `execute'
  /home/git/gitlab/lib/api/branches.rb:143:in `block (2 levels) in <class:Branches>'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/endpoint.rb:57:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/endpoint.rb:57:in `block (2 levels) in generate_api_method'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/notifications.rb:182:in `instrument'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/endpoint.rb:56:in `block in generate_api_method'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/endpoint.rb:262:in `block in run'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/notifications.rb:182:in `instrument'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/endpoint.rb:243:in `run'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/endpoint.rb:313:in `block in build_stack'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:31:in `call!'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:24:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:31:in `call!'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:24:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:31:in `call!'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:24:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-oauth2-1.9.3/lib/rack/oauth2/server/resource.rb:20:in `_call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-oauth2-1.9.3/lib/rack/oauth2/server/resource/bearer.rb:8:in `_call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-oauth2-1.9.3/lib/rack/oauth2/server/abstract/handler.rb:17:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/error.rb:38:in `block in call!'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/error.rb:37:in `catch'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/error.rb:37:in `call!'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:24:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape_logging-1.8.3/lib/grape_logging/middleware/request_logger.rb:60:in `block in call!'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape_logging-1.8.3/lib/grape_logging/middleware/request_logger.rb:58:in `catch'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape_logging-1.8.3/lib/grape_logging/middleware/request_logger.rb:58:in `call!'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:24:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/head.rb:12:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/endpoint.rb:227:in `call!'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/endpoint.rb:221:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/router/route.rb:72:in `exec'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/router.rb:121:in `process_route'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/router.rb:74:in `block in identity'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/router.rb:93:in `transaction'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/router.rb:72:in `identity'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/router.rb:57:in `block in call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/router.rb:137:in `with_optimization'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/router.rb:56:in `call'                                                                                                                                                 
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/api.rb:119:in `call'                                                                                                                                                   
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/api.rb:45:in `call!'                                                                                                                                                   
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grape-1.1.0/lib/grape/api.rb:40:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/routing/mapper.rb:48:in `serve'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/journey/router.rb:49:in `block in serve'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/journey/router.rb:32:in `each'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/journey/router.rb:32:in `serve'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/routing/route_set.rb:834:in `call'
  /home/git/gitlab/lib/gitlab/request_profiler/middleware.rb:17:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/gitlab-labkit-0.12.0/lib/labkit/middleware/rack.rb:19:in `block in call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/gitlab-labkit-0.12.0/lib/labkit/context.rb:32:in `with_context'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/gitlab-labkit-0.12.0/lib/labkit/middleware/rack.rb:18:in `call'
  /home/git/gitlab/lib/gitlab/middleware/go.rb:20:in `call'
  /home/git/gitlab/lib/gitlab/etag_caching/middleware.rb:13:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/batch-loader-1.4.0/lib/batch_loader/middleware.rb:11:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-attack-6.3.0/lib/rack/attack.rb:97:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/apollo_upload_server-2.0.0.beta.3/lib/apollo_upload_server/middleware.rb:20:in `call'
  /home/git/gitlab/lib/gitlab/middleware/multipart.rb:125:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-attack-6.3.0/lib/rack/attack.rb:111:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/warden-1.2.8/lib/warden/manager.rb:36:in `block in call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/warden-1.2.8/lib/warden/manager.rb:34:in `catch'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/warden-1.2.8/lib/warden/manager.rb:34:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-cors-1.0.6/lib/rack/cors.rb:98:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/tempfile_reaper.rb:15:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/etag.rb:25:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/conditional_get.rb:38:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/head.rb:12:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
  /home/git/gitlab/lib/gitlab/middleware/read_only/controller.rb:51:in `call'
  /home/git/gitlab/lib/gitlab/middleware/read_only.rb:18:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/session/abstract/id.rb:259:in `context'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/session/abstract/id.rb:253:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/cookies.rb:648:in `call'
  /home/git/gitlab/lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/callbacks.rb:101:in `run_callbacks'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
  /home/git/gitlab/lib/gitlab/middleware/basic_health_check.rb:25:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/rack/logger.rb:37:in `call_app'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/rack/logger.rb:26:in `block in call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/tagged_logging.rb:80:in `block in tagged'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/tagged_logging.rb:28:in `tagged'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/tagged_logging.rb:80:in `tagged'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/rack/logger.rb:26:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
  /home/git/gitlab/lib/gitlab/middleware/request_context.rb:23:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/request_id.rb:27:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/method_override.rb:22:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/runtime.rb:22:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-timeout-0.5.1/lib/rack/timeout/core.rb:123:in `block in call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-timeout-0.5.1/lib/rack/timeout/support/timeout.rb:19:in `timeout'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-timeout-0.5.1/lib/rack/timeout/core.rb:122:in `call'
  /home/git/gitlab/config/initializers/fix_local_cache_middleware.rb:9:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/sendfile.rb:111:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
  /home/git/gitlab/lib/gitlab/metrics/requests_rack_middleware.rb:60:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/sentry-raven-2.9.0/lib/raven/integrations/rack.rb:51:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine.rb:527:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/railtie.rb:190:in `public_send'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/railtie.rb:190:in `method_missing'
  /home/git/gitlab/lib/gitlab/middleware/release_env.rb:12:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/urlmap.rb:68:in `block in call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/urlmap.rb:53:in `each'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rack-2.0.9/lib/rack/urlmap.rb:53:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/gitlab-puma-4.3.3.gitlab.2/lib/puma/configuration.rb:228:in `call'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/gitlab-puma-4.3.3.gitlab.2/lib/puma/server.rb:691:in `handle_request'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/gitlab-puma-4.3.3.gitlab.2/lib/puma/server.rb:481:in `process_client'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/gitlab-puma-4.3.3.gitlab.2/lib/puma/server.rb:335:in `block in run'
  /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/gitlab-puma-4.3.3.gitlab.2/lib/puma/thread_pool.rb:138:in `block in spawn_thread'

==> /home/git/gitlab/log/api_json.log <==
{"time":"2020-06-12T09:05:32.474Z","severity":"INFO","duration_s":0.02692,"db_duration_s":0.00262,"view_duration_s":0.0243,"status":500,"method":"POST","path":"/api/v4/projects/5/repository/branches","params":[{"key":"ref","value":null},{
"key":"branch","value":"a-random-string"}],"host":"127.0.0.1","remote_ip":"127.0.0.1, 127.0.0.1","ua":"curl/7.58.0","route":"/api/:version/projects/:id/repository/branches","user_id":1,"username":"root","exception.class":"Gitlab::Git::Com
mandError","exception.message":"2:Rugged::ObjectError: ambiguous lookup - OID prefix is too short","exception.backtrace":["lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'","lib/gitlab/git/wraps_gitaly_errors.
rb:6:in `wrapped_gitaly_errors'","lib/gitlab/git/repository.rb:550:in `add_branch'","app/models/repository.rb:207:in `add_branch'","app/services/branches/create_service.rb:12:in `execute'","lib/api/branches.rb:143:in `block (2 levels) in
<class:Branches>'"],"queue_duration_s":0.005787,"gitaly_calls":1,"gitaly_duration_s":0.007578,"redis_calls":4,"redis_duration_s":0.000523,"correlation_id":"4YvGhkHP3ca","meta.user":"root","meta.project":"root/project1","meta.root_namespac
e":"root","meta.caller_id":"/api/:version/projects/:id/repository/branches"}

==> /home/git/gitlab/log/gitlab-workhorse.log <==
127.0.0.1 127.0.0.1 - - [2020/06/12:09:05:32 +0000] "POST /api/v4/projects/5/repository/branches HTTP/1.1" 500 39 "" "curl/7.58.0" 35

Results of GitLab application Check

Checking GitLab subtasks ...       
                
Checking GitLab Shell ...                           
                                                  
GitLab Shell: ... GitLab Shell version >= 13.2.0 ? ... OK (13.2.0)
Running /home/git/gitlab-shell/bin/check
Internal API available: OK                
Redis available via internal API: OK         
gitlab-shell self-check successful                                
                                           
Checking GitLab Shell ... Finished
                                
Checking Gitaly ...

Gitaly: ... default ... OK           

Checking Gitaly ... Finished                                                                                                                                                                                                                 

Checking Sidekiq ...

Sidekiq: ... Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished
Checking GitLab App ...

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? ... skipped (no tmp uploads folder yet)
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have namespace: ... can't check, you have no projects
Redis version >= 4.0.0? ... yes
Ruby version >= 2.5.3 ? ... yes (2.6.6)
Git version >= 2.22.0 ? ... yes (2.27.0)
Git user has default SSH configuration? ... yes
Active users: ... 1
Is authorized keys file accessible? ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Comments

This bug was found using REST API fuzzing.