diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-03 22:44:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-03 22:44:35 +0000 |
commit | 96722e6de1c1f91f62f9ee645c5ad3ec7b05282c (patch) | |
tree | d80ec8b3505fc3055cc8d7ed7f864edc831b7119 /lib | |
parent | b2a2fb69e663aabd66fe2fe8696c49e68c2fbe02 (diff) | |
download | gitlab-ce-96722e6de1c1f91f62f9ee645c5ad3ec7b05282c.tar.gz |
Add latest changes from gitlab-org/gitlab@15-7-stable-ee
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/pypi_packages.rb | 8 | ||||
-rw-r--r-- | lib/gitlab/gitaly_client/commit_service.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/gitaly_client/ref_service.rb | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/api/pypi_packages.rb b/lib/api/pypi_packages.rb index f9470ce1cb6..8c4203d8819 100644 --- a/lib/api/pypi_packages.rb +++ b/lib/api/pypi_packages.rb @@ -99,6 +99,12 @@ module API find_project(params[:id]) || not_found! authorized_user_project(action: action) end + + def validate_fips! + unprocessable_entity! if declared_params[:sha256_digest].blank? + + true + end end params do @@ -284,7 +290,7 @@ module API track_package_event('push_package', :pypi, project: project, user: current_user, namespace: project.namespace) - unprocessable_entity! if Gitlab::FIPS.enabled? && declared_params[:md5_digest].present? + validate_fips! if Gitlab::FIPS.enabled? ::Packages::Pypi::CreatePackageService .new(project, current_user, declared_params.merge(build: current_authenticated_job)) diff --git a/lib/gitlab/gitaly_client/commit_service.rb b/lib/gitlab/gitaly_client/commit_service.rb index de66ca7305f..e5f8a255f7d 100644 --- a/lib/gitlab/gitaly_client/commit_service.rb +++ b/lib/gitlab/gitaly_client/commit_service.rb @@ -78,7 +78,7 @@ module Gitlab def commit_deltas(commit) request = Gitaly::CommitDeltaRequest.new(diff_from_parent_request_params(commit)) response = gitaly_client_call(@repository.storage, :diff_service, :commit_delta, request, timeout: GitalyClient.fast_timeout) - response.flat_map { |msg| msg.deltas } + response.flat_map { |msg| msg.deltas.to_ary } end def tree_entry(ref, path, limit = nil) diff --git a/lib/gitlab/gitaly_client/ref_service.rb b/lib/gitlab/gitaly_client/ref_service.rb index da579276101..98b1d3dceef 100644 --- a/lib/gitlab/gitaly_client/ref_service.rb +++ b/lib/gitlab/gitaly_client/ref_service.rb @@ -235,7 +235,7 @@ module Gitlab end def consume_list_refs_response(response) - response.flat_map(&:references) + response.flat_map { |res| res.references.to_ary } end def sort_local_branches_by_param(sort_by) |