diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2019-03-04 21:36:34 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-03-04 21:36:34 +0300 |
commit | ebf16ada856efb85424a98848c141f21e609886a (patch) | |
tree | e9700c1c392644f035302c61fc8f9c2dc6095a92 /app/models/merge_request_diff.rb | |
parent | adedcb329464783165db2c233b3a6fd9578d2c25 (diff) |
Arbitrary file read via MergeRequestDiff
Diffstat (limited to 'app/models/merge_request_diff.rb')
-rw-r--r-- | app/models/merge_request_diff.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index e286a4e57f2..351a662ae83 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -22,6 +22,8 @@ class MergeRequestDiff < ActiveRecord::Base has_many :merge_request_diff_commits, -> { order(:merge_request_diff_id, :relative_order) } + validates :base_commit_sha, :head_commit_sha, :start_commit_sha, sha: true + state_machine :state, initial: :empty do event :clean do transition any => :without_files |