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

REST API incorrectly deleting all the properties of an artifact when a request to update properties fails with 400 bad request

    XMLWordPrintable

    Details

    • Severity:
      Critical

      Description

      We are using Artifactory SaaS (Pro)

      Replication steps:

      1) Add 2 or 3 random properties to an artifact in Artifactory via UI.

      2) Update one of the above properties by invoking the below REST API call. Please NOTE include a $ sign in the property name to fail the request

      METHOD: PATCH

      URI: https://<base_url>/api/metadata/{repoKey}/{itemPath}

      REQUEST BODY:

      {
      "props":

      { "$key": "value" }

      }

      3) The API call fails with a 400 Bad Request with the below error message

      "Name must start with a letter and cannot contain whitespace or special characters"

      So far I discovered that this issue only happens when the error message is the above. If the response is 400 Bad Request with a different error message the same behavior is not seen.

      4) Check the properties of the same artifact via UI

      EXPECTED: Properties still exist

      ACTUAL: Properties are deleted. Access logs confirm they have been deleted.

      Artifactory access logs:

      2018-07-10 05:19:12,401 [ACCEPTED PROPERTY_REMOVED] local-chorus:nz/co/chorus/chorus-nettest-api/6/chorus-nettest-api-6.zipProperty key branch for admin/.
      2018-07-10 05:19:12,413 [ACCEPTED PROPERTY_REMOVED] local-chorus:nz/co/chorus/chorus-nettest-api/6/chorus-nettest-api-6.zipProperty key build.name for admin/.
      2018-07-10 05:19:12,436 [ACCEPTED PROPERTY_REMOVED] local-chorus:nz/co/chorus/chorus-nettest-api/6/chorus-nettest-api-6.zipProperty key build.number for admin/.
      2018-07-10 05:19:12,449 [ACCEPTED PROPERTY_REMOVED] local-chorus:nz/co/chorus/chorus-nettest-api/6/chorus-nettest-api-6.zipProperty key build.timestamp for admin/.

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              skesiraju Subbarao Kesiraju (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-17106 -
                  SYNCHRONIZED
                  • Last Sync Date: