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:
authorJan Provaznik <jprovaznik@gitlab.com>2018-07-09 14:06:12 +0300
committerJan Provaznik <jprovaznik@gitlab.com>2018-07-09 14:06:12 +0300
commit6b2ebea7dc036c2b21bd47f2955639f9b257b568 (patch)
treee61b7ec8ba14149c844606f720359c1e8329cfb6 /lib/uploaded_file.rb
parente2ec97a92e6393dd0adeed39c77ff2b4eba0aed9 (diff)
Added test and used Array() instead of .wrap
Diffstat (limited to 'lib/uploaded_file.rb')
-rw-r--r--lib/uploaded_file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uploaded_file.rb b/lib/uploaded_file.rb
index 0172461670b..4b9cb59eab5 100644
--- a/lib/uploaded_file.rb
+++ b/lib/uploaded_file.rb
@@ -37,7 +37,7 @@ class UploadedFile
file_path = File.realpath(params["#{field}.path"])
- paths = Array.wrap(upload_paths) << Dir.tmpdir
+ paths = Array(upload_paths) << Dir.tmpdir
unless self.allowed_path?(file_path, paths.compact)
raise InvalidPathError, "insecure path used '#{file_path}'"
end