[RTFACT-15096] Existing files with no SHA256 cause checksum deployment errors on redeployment Created: 11/Oct/17  Updated: 16/Nov/17  Resolved: 18/Oct/17

Status: Resolved
Project: Artifactory Binary Repository
Component/s: REST API
Affects Version/s: None
Fix Version/s: 5.6.0

Type: Bug Priority: Normal
Reporter: Patrick Russell Assignee: Dan Feldman
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates RTFACT-15111 Deployment overwrite check fails if n... Resolved
Assigned QA: Matan Katz

 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.


Generated at Wed Aug 21 01:27:03 UTC 2019 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.