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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 20:20:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 20:20:34 +0300
commite6e7d940173750d26b5625bbaef2437c46374574 (patch)
treeed87770d8a0a00372eef1df16a3a105624c746ba /lib
parentde3b459dcb72572c4d44eb83240f2725ca04b170 (diff)
Add latest changes from gitlab-org/gitlab@12-8-stable-ee
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/middleware/multipart.rb18
-rw-r--r--lib/gitlab/x509/commit.rb17
2 files changed, 25 insertions, 10 deletions
diff --git a/lib/gitlab/middleware/multipart.rb b/lib/gitlab/middleware/multipart.rb
index 0ee9563c227..cb4213d23a4 100644
--- a/lib/gitlab/middleware/multipart.rb
+++ b/lib/gitlab/middleware/multipart.rb
@@ -84,12 +84,6 @@ module Gitlab
end
def open_file(params, key)
- allowed_paths = [
- ::FileUploader.root,
- Gitlab.config.uploads.storage_path,
- File.join(Rails.root, 'public/uploads/tmp')
- ]
-
::UploadedFile.from_params(params, key, allowed_paths)
end
@@ -106,6 +100,16 @@ module Gitlab
# inside other env keys, here we ensure everything is updated correctly
ActionDispatch::Request.new(@request.env).update_param(key, value)
end
+
+ private
+
+ def allowed_paths
+ [
+ ::FileUploader.root,
+ Gitlab.config.uploads.storage_path,
+ File.join(Rails.root, 'public/uploads/tmp')
+ ]
+ end
end
def initialize(app)
@@ -125,3 +129,5 @@ module Gitlab
end
end
end
+
+::Gitlab::Middleware::Multipart::Handler.prepend_if_ee('EE::Gitlab::Middleware::Multipart::Handler')
diff --git a/lib/gitlab/x509/commit.rb b/lib/gitlab/x509/commit.rb
index ce298b80a4c..b1d15047981 100644
--- a/lib/gitlab/x509/commit.rb
+++ b/lib/gitlab/x509/commit.rb
@@ -105,13 +105,22 @@ module Gitlab
def certificate_crl
extension = get_certificate_extension('crlDistributionPoints')
- extension.split('URI:').each do |item|
- item.strip
+ crl_url = nil
- if item.start_with?("http")
- return item.strip
+ extension.each_line do |line|
+ break if crl_url
+
+ line.split('URI:').each do |item|
+ item.strip
+
+ if item.start_with?("http")
+ crl_url = item.strip
+ break
+ end
end
end
+
+ crl_url
end
def get_certificate_extension(extension)