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

Latest version Rest API interpretes underscore ('_') as wildcard

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 3.5.2
    • Fix Version/s: 4.8.1
    • Component/s: None
    • Labels:
      None
    • Severity:
      High

      Description

      If there is an underscore in the artifactID, the REST query will treat it as a wildcard:
      Steps to reproduce:

      1. Deploy artifacts:
      libs-release-local/test/MIAT_FW/1-u0/MIAT_FW-1-u0.jar
      libs-release-local/test/MIAT_FW/2-u0/MIAT_FW-2-u0.jar
      2. Deploy Artifact:
      libs-release-local/test/MIATxFW/3-u0/MIATxFW-3-u0.jar (different ArtifactID, higher version)
      3. Run latest version search:

      curl -uadmin:password "http://localhost:8081/artifactory/api/search/latestVersion?g=test&repos=libs-release-local&a=MIAT_FW"
      

      The result is '3-u0'

      The _ and possibly % characters should be escaped before querying the DB.

        Attachments

          Activity

              People

              Assignee:
              shayy Shay Yaakov (Inactive)
              Reporter:
              itamarb Itamar Berman-Eshel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: