Skip to content
  • Stan Hu's avatar
    Fix URL blocker when object storage enabled but type is disabled · 7560d2dc
    Stan Hu authored
    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), 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
    
    Changelog: fixed
    7560d2dc