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:
authorBob Van Landuyt <bob@gitlab.com>2017-06-16 13:11:33 +0300
committerBob Van Landuyt <bob@gitlab.com>2017-06-21 17:09:35 +0300
commit79393a351db47afa0df3588b5cdf9fb254c75282 (patch)
treedea2a56eef6c2c3088449de14aea77b235f4d743 /app/validators
parentcf3cdd48bb4959cb277752a16a4b98b7f4a4f3c4 (diff)
Rebuild the dynamic path before validating it
Otherwise we won't validate updates to the path. Allowing users to change the path to something that's not allowed.
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/dynamic_path_validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/dynamic_path_validator.rb b/app/validators/dynamic_path_validator.rb
index 27ac60637fd..4688aabc2a8 100644
--- a/app/validators/dynamic_path_validator.rb
+++ b/app/validators/dynamic_path_validator.rb
@@ -26,7 +26,7 @@ class DynamicPathValidator < ActiveModel::EachValidator
end
def path_valid_for_record?(record, value)
- full_path = record.respond_to?(:full_path) ? record.full_path : value
+ full_path = record.respond_to?(:build_full_path) ? record.build_full_path : value
return true unless full_path