diff --git a/app/validators/system_hook_url_validator.rb b/app/validators/system_hook_url_validator.rb index c8c0007e35b..e482828685d 100644 --- a/app/validators/system_hook_url_validator.rb +++ b/app/validators/system_hook_url_validator.rb @@ -2,7 +2,7 @@ # SystemHookUrlValidator # -# Custom validator specifically for SystemHook URLs. This validator works like AddressableUrlValidator but +# Custom validator specific to SystemHook URLs. This validator works like AddressableUrlValidator but # it blocks urls pointing to localhost or the local network depending on # ApplicationSetting.allow_local_requests_from_system_hooks # @@ -14,8 +14,8 @@ # class SystemHookUrlValidator < AddressableUrlValidator DEFAULT_OPTIONS = { - allow_localhost: true, - allow_local_network: true + allow_localhost: false, + allow_local_network: false }.freeze def initialize(options) diff --git a/doc/security/img/outbound_requests_section_v2.png b/doc/security/img/outbound_requests_section_v2.png new file mode 100644 index 00000000000..4fd3c7d9fce Binary files /dev/null and b/doc/security/img/outbound_requests_section_v2.png differ diff --git a/doc/security/webhooks.md b/doc/security/webhooks.md index 1194234a295..401df02e5c3 100644 --- a/doc/security/webhooks.md +++ b/doc/security/webhooks.md @@ -34,15 +34,15 @@ to 127.0.0.1, ::1 and 0.0.0.0, as well as IPv4 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 and IPv6 site-local (ffc0::/10) addresses won't be allowed. This behavior can be overridden by enabling the option *"Allow requests to the -local network from hooks and services"* in the *"Outbound requests"* section +local network from web hooks and services"* in the *"Outbound requests"* section inside the Admin area under **Settings** (`/admin/application_settings/network`): -![Outbound requests admin settings](img/outbound_requests_section.png) +![Outbound requests admin settings](img/outbound_requests_section_v2.png) >**Note:** -*System hooks* are exempt from this protection because they are set up by -admins. +*System hooks* are enabled to make requests to local network by default since they are set up by admins. +However, it can be turned off by disabling *"Allow requests to the local network from system hooks"* option.