Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-54066

Unable use any values that contains a slash as a parameter in REST API

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a bug
    • Low
    • None
    • 6.4.3
    • None

    Description

      Summary

      REST API will not work when the parameter contains slash "/".
      For example, GET membership REST API URI will not work if the group contains slash "/".

      Steps to Reproduce

      1. Create a group that contains slash, for example "group/1"
      2. Try to list out its members using REST API.

      Actual Result:

      1. <confluence base_URL>/rest/api/group/group/1/member ---> Gives 400 error.
      2. <confluence base_URL>/rest/api/group/group%2F1/member ---> Gives 400 error.
      3. <confluence base_URL>/rest/api/group/group%252F1/member ---> Gives 0 members

      Notes

      The issue happens because Tomcat actually intentionally prevents URL decoding of / for some kind of security reason:

      Workaround

      Add the following in the JVM argument:

      -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
      

      More information on setting up JVM Arguments: Configuring System Properties

      Attachments

        Activity

          People

            Unassigned Unassigned
            mkhairuliana Monique Khairuliana (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: