diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-02-20 11:34:57 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-02-20 11:34:57 +0300 |
commit | 590cc1d4625ee948fa08ef64c59db810bb55fdbf (patch) | |
tree | fbba3e3a194c3fcaa030f0a064dabcb15f758512 /app | |
parent | 678f55da3e608a1507e451e72540d63f3bacc315 (diff) | |
parent | 89f7bac3ba980019e6a75f869dec69da5d7a69ab (diff) |
Merge branch 'comment-url-validator-cycle' into 'master'
Comment why we can't use Gitlab::CurrentSettings
See merge request gitlab-org/gitlab-ce!25412
Diffstat (limited to 'app')
-rw-r--r-- | app/validators/url_validator.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/validators/url_validator.rb b/app/validators/url_validator.rb index d3e32818dc7..3fd015c3cf5 100644 --- a/app/validators/url_validator.rb +++ b/app/validators/url_validator.rb @@ -93,6 +93,12 @@ class UrlValidator < ActiveModel::EachValidator end def allow_setting_local_requests? + # We cannot use Gitlab::CurrentSettings as ApplicationSetting itself + # uses UrlValidator to validate urls. This ends up in a cycle + # when Gitlab::CurrentSettings creates an ApplicationSetting which then + # calls this validator. + # + # See https://gitlab.com/gitlab-org/gitlab-ee/issues/9833 ApplicationSetting.current&.allow_local_requests_from_hooks_and_services? end end |