diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-01-02 12:35:15 +0100 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-01-03 15:37:32 +0100 |
commit | ec273b8d069bf3f9a12a2ffde545398cd2967eeb (patch) | |
tree | 76e85434455ceec9cbad2ba8b8f10b8107e4d28a /app/uploaders | |
parent | 8dc2163ce580f1d71be1cf45e5dfcb2b4763d7bb (diff) | |
download | gitlab-ce-ec273b8d069bf3f9a12a2ffde545398cd2967eeb.tar.gz |
Copy, don't move uploaded avatar files
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/avatar_uploader.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb index a1ecb7bc00b..265cea2d2c6 100644 --- a/app/uploaders/avatar_uploader.rb +++ b/app/uploaders/avatar_uploader.rb @@ -10,4 +10,15 @@ class AvatarUploader < GitlabUploader def exists? model.avatar.file && model.avatar.file.exists? end + + # We set move_to_store and move_to_cache to 'false' to prevent stealing + # the avatar file from a project when forking it. + # https://gitlab.com/gitlab-org/gitlab-ce/issues/26158 + def move_to_store + false + end + + def move_to_cache + false + end end |