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

Artifactory: RestAPI is not retrieving the group information that has + in the name.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: 4 - Normal
    • Resolution: Done
    • Affects Version/s: 6.17.0, 6.7.8
    • Fix Version/s: 7.12.3, 6.23.7
    • Component/s: None
    • Labels:
    • Severity:
      Medium
    • Release Notes:
      Yes

      Description

      We have a customer reporting that the group (with name included with +) information is not getting retrieved via RestAPI calls. In order to reproduce the scenario, I have created a group in Artifactory instance with a name test+test. When I try to retrieve the group information via RestAPI call, it is not retrieving the data and returns 404.

      ➜ curl -uadmin:password -X GET "http://localhost:8081/artifactory/api/security/groups/test+test"
      {
      "errors" : [

      { "status" : 404, "message" : "Not Found" }

      ]
      }%

      Even I have tried to escape + from the URI while triggering the RestAPI call with %2B and it didn’t help.

      ➜ curl -uadmin:password -X GET "http://localhost:8081/artifactory/api/security/groups/test%2Btest"
      {
      "errors" : [

      { "status" : 404, "message" : "Not Found" }

      ]
      }%

      Artifactory version 6.8 release notes mention that we have fixed the issue in which Artifactory allowed to create users and groups even if the name is included with illegal characters (/\:|?*"<>). Artifactory now validates that the username and group name only include legal characters as is done when creating a user or a group through the UI.

      When I try to create the group name included with any of the illegal characters as mentioned UI is returning an error. Whereas creating a group with + is not returning any error but the group information retrieval fails via RestAPI.

      Steps to reproduce the scenario
      -------------------------------------------
      1. Create a group named test+test in Artifactory.
      2. Create another group named testtest.
      3. Now, use the below command to retrieve the group information.

      curl -uadmin:password -X GET "http://localhost:8081/artifactory/api/security/groups/test+test"
      curl -uadmin:password -X GET "http://localhost:8081/artifactory/api/security/groups/testtest"

      While triggering the RestAPI calls as above, the first command will return a 404 error whereas the second call will reveal the group information.

        Attachments

          Activity

            People

            Assignee:
            volodymyrm Volodymyr Marchev [EXT]
            Reporter:
            yuvarajanj Yuvarajan J
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Sync Status

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