diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-02-20 10:50:58 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-02-20 10:50:58 +1300 |
commit | 89f7bac3ba980019e6a75f869dec69da5d7a69ab (patch) | |
tree | c74d83ef09b3f983198d21569fbb5b5b2c1c2a0d /app/validators | |
parent | b570f53d17f5bc0e72fef9a122b7fe5645db0ea9 (diff) | |
download | gitlab-ce-89f7bac3ba980019e6a75f869dec69da5d7a69ab.tar.gz |
Comment why we can't use Gitlab::CurrentSettings
See https://gitlab.com/gitlab-org/gitlab-ee/issues/9833
Diffstat (limited to 'app/validators')
-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 |