Skip to content
  • Stan Hu's avatar
    Fix Gradle publish failure in FIPS mode · 6b09e9ce
    Stan Hu authored
    Previously in FIPS mode when a Gradle build attempted to publish a
    package with an MD5 checksum, GitLab Rails would return a 422 error.
    This only showed up as a warning with Maven, but Gradle fails the
    publish step entirely.
    
    In FIPS mode, we've already told Workhorse not to generate a MD5
    checksum via `UploadHashFunctions`, and the first FIPS check in the
    PUT request ensures that Workhorse obeys that. However, there was a
    second check in the PUT request that rejects the `.md5` suffix, but
    this is unnecessary since no MD5 checksum will be
    stored. `extract_format` is a shared helper, make this second FIPS
    check optional since we still want to reject GET requests with the
    `.md5` suffix.
    
    Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/436387
    
    Changelog: fixed
    6b09e9ce