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:
Diffstat (limited to 'lib/api/maven_packages.rb')
-rw-r--r--lib/api/maven_packages.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/api/maven_packages.rb b/lib/api/maven_packages.rb
index 14c3fccee32..e969935383a 100644
--- a/lib/api/maven_packages.rb
+++ b/lib/api/maven_packages.rb
@@ -260,7 +260,13 @@ module API
authorize_upload!
bad_request!('File is too large') if user_project.actual_limits.exceeded?(:maven_max_file_size, params[:file].size)
- file_name, format = extract_format(params[:file_name])
+ # In FIPS mode, we've already told Workhorse not to generate a
+ # MD5 checksum via UploadHashFunctions, and the FIPS check above
+ # ensures that Workhorse obeys that. However, Gradle will attempt to issue a PUT request
+ # with the MD5 checksum, and the publish step will fail if this endpoint returns a
+ # 422 (https://github.com/gradle/gradle/blob/v8.5.0/platforms/software/maven/src/main/java/org/gradle/api/publish/maven/internal/publisher/AbstractMavenPublisher.java#L240),
+ # so we need to skip the second FIPS check here.
+ file_name, format = extract_format(params[:file_name], skip_fips_check: true)
::Gitlab::Database::LoadBalancing::Session.current.use_primary do
result = ::Packages::Maven::FindOrCreatePackageService