summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2017-08-21 17:50:34 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2017-08-22 11:33:18 +0200
commit539dee96739f1dd8925bd890ec2f9549775a949a (patch)
tree392cf6cbe4f5f338f71f512e95a097395448a7f4 /config
parentfa293df2b7f3f63b72640dbc5e70b539cbd106b1 (diff)
downloadgitlab-ce-539dee96739f1dd8925bd890ec2f9549775a949a.tar.gz
Update form to properly set the path
Also includes a change in allowing uploaded files, as there was a mismatch in object_id between classes, disallowing params[:file], which is a UploadedFile, newly loaded. The params checked against the older version. Fixes gitlab-org/gitlab-ce#36519
Diffstat (limited to 'config')
-rw-r--r--config/initializers/workhorse_multipart.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/config/initializers/workhorse_multipart.rb b/config/initializers/workhorse_multipart.rb
index 064e5964f09..4196e3a8f61 100644
--- a/config/initializers/workhorse_multipart.rb
+++ b/config/initializers/workhorse_multipart.rb
@@ -10,10 +10,8 @@ end
#
module Gitlab
module StrongParameterScalars
- GITLAB_PERMITTED_SCALAR_TYPES = [::UploadedFile].freeze
-
def permitted_scalar?(value)
- super || GITLAB_PERMITTED_SCALAR_TYPES.any? { |type| value.is_a?(type) }
+ super || value.is_a?(::UploadedFile)
end
end
end