• D
    Handle Stored XSS for Grafana URL in settings · da6a3067
    David Wilkins 提交于
    - Extend Gitlab::UrlBlocker to allow relative urls (require_absolute
      setting).  The new `require_absolute` setting defaults to true,
      which is the existing behavior.
    
    - Extend AddressableUrlValidator to accept `require_abosolute` and
      default to the existing behavior
    
    - Add validation for ApplicationSetting#grafana_url to validate that
      the URL does not contain XSS but can be a valid relative or absolute
      url.
    
    - In the case of existing stored URLs, validate the stored URL does
      not contain XSS. If the stored URL contains stored XSS or is an
      otherwise invalid URL, return the default database column value.
    
    - Add tests for Gitlab::UrlBlocker to test require_absolute setting
    
    - Add tests for AddressableUrlValidator
    
    - Add tests for ApplicationSetting#grafana_url
    da6a3067
application_setting_spec.rb 18.1 KB