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

AQL query having a wildcard character "*" and “%2F" in folder name returns no results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 7.27.6
    • Fix Version/s: None
    • Component/s: AQL
    • Labels:
    • Location:
      External

      Description

      Description:

      While searching the artifacts using AQL query is returning no results if AQL query has the wildcard pattern ("*") in the repository path and “%2F” in the folder name.

      For Example:

      This query returns the no result as the folder name contains “%2F” and repository path has wildcard pattern (i.e. “*”) in the AQL query as shown below:

      curl -u admin:password -X POST -H "Content-Type:text/plain" -d 'items.find({ "repo": "generic-local", "path":

      { "$match": "test/jims%2Ftest/*" }

      , "name": { "$match": "*.jar" }} )' http://localhost:8081/artifactory/api/search/aql

      {
      "results" : [  ],
      "range" : {
        "start_pos" : 0,
        "end_pos" : 0,
        "total" : 0
      }
      }
      

       

      This query returns the correct result when the folder name contains underscore along with “%2F” and repository path has wildcard pattern (i.e. “*”) in the AQL query as shown below:

      curl -u admin:password -X POST -H "Content-Type:text/plain" -d 'items.find({ "repo": "generic-local", "path":

      { "$match": "test/jims%2Ftest_with/*" }

      , "name": { "$match": "*.jar" }} )' http://localhost:8081/artifactory/api/search/aql

       

      Expected result:
      AQL query should return the result as expected

      Actual result:
      AQL query is returning no result.

       

      Steps to reproduce:

      1) Create a folder name with “%2F” in the generic repository and deploy a few jars in it.

      2) Run the below curl command and verify the result 

      curl -u admin:password -X POST -H "Content-Type:text/plain" -d 'items.find({ "repo": "generic-local", "path":

      { "$match": "jims%2Ftest/*" }

      , "name": { "$match": "*.jar" }} )'

       

      Environment details: 

      Artifactory version in which the bug was reproduced: tested on 7.23.3 and 7.27.6

      DB type & Version : PostgreSQL 9.6.11 

      Is this an HA env:  No

      Is this On-Prem or SaaS:  SaaS

      OS details if relevant: NA

       

      Impact:

      Builds are not downloading the artifacts from the folders with the name "%2F" in them using AQL, as the AQL query returns no results. 

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              sandeepa Sandeep Anikapati
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

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