Skip to content

Fix URL blocker when object storage enabled but type is disabled

Stan Hu requested to merge sh-fix-url-blocker into master

This commit fixes two problems:

  1. If the object type is disabled but object storage is enabled (as it is in Cloud Native GitLab), previously the URL blocker would attempt to drill into the endpoint. We now check that the type is also enabled.

  2. Due to a Settingslogic bug (#286873 (closed)), the use of default anywhere causes Hash#default to be overriden for the Settingslogic class. If connection field connection.endpoint is
    omittted from object storage config, this previously would result in an error:

ArgumentError: wrong number of arguments (given 1, expected 0)>

We need to call to_h because we define default as a Gitaly storage name in GitLab Charts.

Relates to #357340 (closed)

Edited by Stan Hu

Merge request reports