diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-06-16 12:11:33 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-06-21 16:09:35 +0200 |
commit | 79393a351db47afa0df3588b5cdf9fb254c75282 (patch) | |
tree | dea2a56eef6c2c3088449de14aea77b235f4d743 /app/validators | |
parent | cf3cdd48bb4959cb277752a16a4b98b7f4a4f3c4 (diff) | |
download | gitlab-ce-79393a351db47afa0df3588b5cdf9fb254c75282.tar.gz |
Rebuild the dynamic path before validating itbvl-validate-path-update
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.rb | 2 |
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 |