diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-23 00:09:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-23 00:09:01 +0000 |
commit | 5c55a3aecc2776f453ec1e36769640e85d326be4 (patch) | |
tree | 020a5be0bfc0e66bdeb2a0fa4a655bf14845b28f | |
parent | 807479760c0257629a21d41aa4d8ad8e81b14f56 (diff) | |
download | gitlab-ce-5c55a3aecc2776f453ec1e36769640e85d326be4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | app/models/concerns/vulnerability_finding_helpers.rb | 3 | ||||
-rw-r--r-- | doc/administration/uploads.md | 6 | ||||
-rw-r--r-- | lib/gitlab/http_io.rb | 2 | ||||
-rw-r--r-- | locale/gitlab.pot | 9 | ||||
-rw-r--r-- | spec/lib/gitlab/http_io_spec.rb | 2 |
5 files changed, 16 insertions, 6 deletions
diff --git a/app/models/concerns/vulnerability_finding_helpers.rb b/app/models/concerns/vulnerability_finding_helpers.rb index 4cf36f83857..b5d48260072 100644 --- a/app/models/concerns/vulnerability_finding_helpers.rb +++ b/app/models/concerns/vulnerability_finding_helpers.rb @@ -50,7 +50,7 @@ module VulnerabilityFindingHelpers finding_data = report_finding.to_hash.except(:compare_key, :identifiers, :location, :scanner, :links, :signatures, :flags, :evidence) identifiers = report_finding.identifiers.map do |identifier| - Vulnerabilities::Identifier.new(identifier.to_hash) + Vulnerabilities::Identifier.new(identifier.to_hash.merge({ project: project })) end signatures = report_finding.signatures.map do |signature| Vulnerabilities::FindingSignature.new(signature.to_hash) @@ -72,6 +72,7 @@ module VulnerabilityFindingHelpers end finding.identifiers = identifiers + finding.primary_identifier = identifiers.first finding.signatures = signatures end end diff --git a/doc/administration/uploads.md b/doc/administration/uploads.md index 0bd46193d10..2dd8f1ed819 100644 --- a/doc/administration/uploads.md +++ b/doc/administration/uploads.md @@ -112,15 +112,15 @@ _The uploads are stored by default in `/home/git/gitlab/public/uploads`._ 1. Edit `/home/git/gitlab/config/gitlab.yml` and add or amend the following - lines: + lines, making sure to use the [appropriate ones for your provider](object_storage.md#connection-settings): ```yaml uploads: object_store: enabled: true remote_directory: "uploads" # The bucket name - connection: - provider: AWS # Only AWS supported at the moment + connection: # The lines in this block depend on your provider + provider: AWS aws_access_key_id: AWS_ACCESS_KEY_ID aws_secret_access_key: AWS_SECRET_ACCESS_KEY region: eu-central-1 diff --git a/lib/gitlab/http_io.rb b/lib/gitlab/http_io.rb index bd3ac139168..25b86fbf22f 100644 --- a/lib/gitlab/http_io.rb +++ b/lib/gitlab/http_io.rb @@ -153,7 +153,7 @@ module Gitlab http.request(request) end - raise FailedToGetChunkError unless response.code == '200' || response.code == '206' + raise FailedToGetChunkError, "Unexpected response code: #{response.code}" unless response.code == '200' || response.code == '206' @chunk = response.body.force_encoding(Encoding::BINARY) @chunk_range = response.content_range diff --git a/locale/gitlab.pot b/locale/gitlab.pot index de541484596..1b1cd638336 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -14956,6 +14956,9 @@ msgstr "" msgid "Error creating the snippet" msgstr "" +msgid "Error creating vulnerability finding: %{errors}" +msgstr "" + msgid "Error deleting project. Check logs for error details." msgstr "" @@ -32585,6 +32588,9 @@ msgstr "" msgid "Reply…" msgstr "" +msgid "Report Finding not found" +msgstr "" + msgid "Report abuse" msgstr "" @@ -34403,6 +34409,9 @@ msgstr "" msgid "Security Dashboard" msgstr "" +msgid "Security Finding not found" +msgstr "" + msgid "Security dashboard" msgstr "" diff --git a/spec/lib/gitlab/http_io_spec.rb b/spec/lib/gitlab/http_io_spec.rb index 5ba0cb5e686..1376b726df3 100644 --- a/spec/lib/gitlab/http_io_spec.rb +++ b/spec/lib/gitlab/http_io_spec.rb @@ -262,7 +262,7 @@ RSpec.describe Gitlab::HttpIO do end it 'reads a trace' do - expect { subject }.to raise_error(Gitlab::HttpIO::FailedToGetChunkError) + expect { subject }.to raise_error(Gitlab::HttpIO::FailedToGetChunkError, 'Unexpected response code: 500') end end |