Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-15096

Existing files with no SHA256 cause checksum deployment errors on redeployment

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6.0
    • Component/s: REST API
    • Labels:
      None

      Description

      This problem will only happen after a specific chain of events. At the end of it the bug prevents users from using the SHA256 Checksum Deploy REST API headers.

      Steps to reproduce:
      1. Start with an Artifactory Pro with a version below 5.4.6 (Ex: 5.2.0)
      2. Upload an empty file to the Artifactory:
      touch test.txt | curl -T test.txt http://<ART>/artifactory/<REPO>/test

      3. Do not calculate the SHA256 checksum
      4. Upgrade to Artifactory 5.5.1 through 5.4.6
      6. Calculate the SHA256 checksum for the empty file (sha256sum test.txt)
      7. Attempt to overwrite the artifact with a checksum deploy to Artifactory 5.5.1:

      curl -uadmin:password -H"X-Checksum-Deploy: true" -H"X-Checksum-Sha256: e3b0c44298fc1c19afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -T ~/test http://localhost:8081/artifactory/example-repo-local/test
      {
      "errors" : [

      { "status" : 500, "message" : "" }

      ]
      }

      Artifactory log:

      2017-10-11 21:06:30,744 [http-nio-8081-exec-5] [ERROR] (o.a.w.s.RepoFilter :224) - Sending HTTP error code 500
      java.lang.NullPointerException: null
      at org.artifactory.repo.db.DbStoringRepoMixin.shouldProtectPathDeletion(DbStoringRepoMixin.java:814) ~[artifactory-core-5.5.1.jar:na]
      at org.artifactory.repo.db.DbStoringRepoMixin.shouldProtectPathDeletion(DbStoringRepoMixin.java:792) ~[artifactory-core-5.5.1.jar:na]

      Workaround: Trigger the SHA256 Checksum Migration.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                danf Dan Feldman
                Reporter:
                patrickr Patrick Russell
                Assigned QA:
                Matan Katz
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: