Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-02-20 00:50:58 +0300
committerThong Kuah <tkuah@gitlab.com>2019-02-20 00:50:58 +0300
commit89f7bac3ba980019e6a75f869dec69da5d7a69ab (patch)
treec74d83ef09b3f983198d21569fbb5b5b2c1c2a0d /app/validators
parentb570f53d17f5bc0e72fef9a122b7fe5645db0ea9 (diff)
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.rb6
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