Skip to content

Update hooks documentation for host masking

Ben King requested to merge benjaminking-update-hooks-doc into master

What does this MR do and why?

In this ticket, a customer reported that while following the current documentation they continued to encounter an error where they could not save a mask that featured a variable within the host portion of their URL. For example: https://{test}.site/{payload}.

Attempting to save a configuration with masking in the host portion of the URL will always fail to due to the addressable gem that is used. Here's an example when trying to parse from Rails console:

Test 1: Failure

irb(main):008:0> url = "https://{test}.site/{payload}"
=> "https://{test}.site/{payload}"
irb(main):009:0> Addressable::URI.parse(url)
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/addressable-2.8.1/lib/addressable/uri.rb:2496:in `validate': Invalid character in host: '{test}.site' (Addressable::URI::InvalidURIError)

Test 2: Success

irb(main):010:0> url = "https://example.site/{payload}"
=> "https://example.site/{payload}"
irb(main):011:0> Addressable::URI.parse(url)
=> #<Addressable::URI:0xada48 URI:https://example.site/{payload}>

This MR removes reference to the 'subdomain' variable, and adds a sentence noting that the host portion of the URL must be left unmodified.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading