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:
authorFrancisco Javier López <fjlopez@gitlab.com>2019-09-05 12:11:14 +0300
committerThong Kuah <tkuah@gitlab.com>2019-09-05 12:11:14 +0300
commit537eb0bb2d4d8a2af9753850c4a85fc473b68d8d (patch)
tree13528ed19cbc5c7a30fd0945223b8f2d84e9396b /app/validators
parent8d93ec2e90edde1b519fa59fdc8e2af12d76d4c0 (diff)
Avoid checking dns rebind protection in validation
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/addressable_url_validator.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/validators/addressable_url_validator.rb b/app/validators/addressable_url_validator.rb
index bb445499cee..f292730441c 100644
--- a/app/validators/addressable_url_validator.rb
+++ b/app/validators/addressable_url_validator.rb
@@ -42,6 +42,11 @@
class AddressableUrlValidator < ActiveModel::EachValidator
attr_reader :record
+ # By default, we avoid checking the dns rebinding protection
+ # when saving/updating a record. Sometimes, the url
+ # is not resolvable at that point, and some automated
+ # tasks that uses that url won't work.
+ # See https://gitlab.com/gitlab-org/gitlab-ce/issues/66723
BLOCKER_VALIDATE_OPTIONS = {
schemes: %w(http https),
ports: [],
@@ -49,7 +54,8 @@ class AddressableUrlValidator < ActiveModel::EachValidator
allow_local_network: true,
ascii_only: false,
enforce_user: false,
- enforce_sanitization: false
+ enforce_sanitization: false,
+ dns_rebind_protection: false
}.freeze
DEFAULT_OPTIONS = BLOCKER_VALIDATE_OPTIONS.merge({